<aeth> An updated web page design signals that the entity behind it is still alive.
<aeth> It doesn't reflect well on CL
<pansninja> Seriously?
orivej has joined #lisp
<pansninja> I really hope you're kidding.
<cgay> KMP is still alive and kicking.
<cgay> pansninja: I'm with you, fwiw.
<aeth> The HyperSpec could be worse, though. This website is also from 1996: https://www.warnerbros.com/archive/spacejam/movie/jam.htm
fortitude__ has joined #lisp
<pansninja> aeth: I am sorry brother, but that is a useless argument.
<aeth> pansninja: What's a useless argument?
<pansninja> The point is, that hyperspec sucks in 2018. Not that some websites from 1990s suck more.
davsebamse has joined #lisp
<bms_> I actually love that Space Jam site.
<pansninja> And if Hyperspecw was merely a historical artifact, I would understand.
<pansninja> But it is touted as the canonical reference.
<aeth> My point is that a web design from 1996 (with the background turned to white and the images very slightly updated iirc) as the official reference isn't going to reflect well on the community. Especially when the competition has websites like this: https://docs.python.org/3/
<pansninja> Which is just not good enough for 2018. It sucks.
<pansninja> cgay: I find it strange that not many people around here see the problem.
<bms_> I think you guys are kind of saying the same thing. Where's the argument?
<rme> Well then, I'll get right on that.
<aeth> Actually, I hate the new Python documentation style.
<Xach> People who are used to the spec as it is can access info very quickly, so there's a reduced incentive to change it.
<Xach> I am used to it, I like it, and I can find exactly what I need very quickly. So I don't mind the way it is at all.
<cgay> pansninja: welcome to lisp :)
<Xach> I'm up for something newer, if it's also easy to use.
<Xach> I'm just not going to do it myself - I like what I have.
<bms_> There's also a reduced incentive for new people to use it, although I've had no real problem with it.
<aeth> Xach: I personally can only navigate the hyperspec through http://l1sp.org/html/
<Xach> I think it takes a special kind of determination to start with something you don't like, learn it well enough to do it better, and then still do it better. There are many opportunities to either peel off or decide it's not bad after all.
<aeth> I use !l1sp in DDG to search
<Xach> Yes, I think it's pretty important to be able to jump exactly to a definition or chapter.
<aeth> Iirc, the HyperSpec has essentially no style. Changing your browser's default font from serif to sans-serif helps make it look more modern
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> For more elaborate things, like setting a maximum width, you can use a simple script. One way is through Greasemonkey in Firefox. That's probably a more annoying style issue.
<aeth> A lot of modern sites have this issue, though. I guess designers never test their site at 1080p fullscreen
JuanDaugherty has quit [Quit: Ex Chat]
<sigjuice> pansninja C-c C-d h takes you right to whatever is under your cursor. and every page has a million cross-references.
<pansninja> sigjuice: I don't use what you do.
<sigjuice> what do you use then?
attila_lendvai has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
damke__ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<sigjuice> s,different,,
Oladon has joined #lisp
turkja has joined #lisp
pierpa has joined #lisp
ryanbw has quit [Ping timeout: 248 seconds]
<aeth> sigjuice: The HyperSpec is so old that, ironically, its style has (mostly) come back around as long as your web browser defaults to san-serif (which most don't, but it is configurable) instead of serif. The main exceptions are that the search isn't accessible from the page and the navigation is done through GIFs
igemnace has quit [Read error: Connection reset by peer]
<aeth> Not having a max width is pretty bad, even Python's documentation is basically unreadable with a maximized or fullscreen browser at 1080p
igemnace has joined #lisp
<aeth> Much better documentation: https://docs.racket-lang.org/
<aeth> (Except that's serif, not sans-serif)
<aeth> Another small detail is links are color coded blue and not both color coded and underlined these days.
<aeth> (I think Wikipedia started that trend)
<aeth> There are some very small details that could greatly improve CL documentation
<aeth> One thing almost all of the documentation sites do is make code blocks very distinguishable from body text
markong has quit [Ping timeout: 264 seconds]
EvW has quit [Ping timeout: 255 seconds]
<rpg> aeth: I'm not sure why designers dropped the underlining -- oftentimes these days links are very hard to find. Sometimes they don't mark them at all and websites are like a point-and-click adventure game...
<aeth> It works on Wikipedia. It doesn't work if you don't keep the color system, ideally the exact same one as Wikipedia's
EvW1 has joined #lisp
bms_ has quit [Quit: Leaving]
wurui has joined #lisp
<aeth> It's not like the HyperSpec is any better, though. Image links for navigation are bad, especially because they're archaic and so don't stand out
damke has joined #lisp
damke__ has quit [Ping timeout: 263 seconds]
lugh has quit [Quit: quitting bouncer]
lugh has joined #lisp
lugh has quit [Client Quit]
lugh has joined #lisp
<rpg> aeth: ? Seems like tons of websites use images as links.
reverse_light has joined #lisp
bms_ has joined #lisp
bms_ has quit [Remote host closed the connection]
<aeth> rpg: Usually they use SVGs or fonts these days afaik
wurui1 has joined #lisp
bms_ has joined #lisp
pilfink has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<aeth> Technically images, but a very different appearance
wurui has quit [Ping timeout: 260 seconds]
wurui1 has left #lisp [#lisp]
broccolistem has quit [Quit: WeeChat 2.1-dev]
broccolistem has joined #lisp
Oladon has quit [Quit: Leaving.]
add^_ has quit [Ping timeout: 248 seconds]
jstypo has quit [Ping timeout: 260 seconds]
Fare has quit [Ping timeout: 248 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
d4ryus1 has joined #lisp
loli has quit [Quit: WeeChat 2.0.1]
red-dot has joined #lisp
d4ryus has quit [Ping timeout: 265 seconds]
loli has joined #lisp
jonh has joined #lisp
broccolistem has quit [Quit: WeeChat 2.1-dev]
broccolistem has joined #lisp
jstypo has joined #lisp
nirved has quit [Quit: Leaving]
MrBusiness3 has quit [Read error: Connection reset by peer]
heurist` has joined #lisp
MrBusiness3 has joined #lisp
jameser has joined #lisp
heurist has quit [Ping timeout: 252 seconds]
bms_ has quit [Quit: Leaving]
ckonstanski has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 265 seconds]
yeticry has joined #lisp
Fare has joined #lisp
cpape has quit [Read error: Connection reset by peer]
cpape has joined #lisp
p_l has quit [Ping timeout: 272 seconds]
Blkt_ has quit [Remote host closed the connection]
wxie has joined #lisp
Blkt has joined #lisp
dieggsy has joined #lisp
wildbartty has quit [Remote host closed the connection]
jstypo has quit [Ping timeout: 248 seconds]
jmercouris has joined #lisp
erikc has joined #lisp
<jmercouris> hello everyone
hexfive has quit [Quit: WeeChat 1.9.1]
vancan1ty has quit [Ping timeout: 265 seconds]
damke_ has joined #lisp
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
damke has quit [Ping timeout: 264 seconds]
JenElizabeth has joined #lisp
jstypo has joined #lisp
dieggsy has joined #lisp
bms_ has joined #lisp
tonton has quit [Ping timeout: 240 seconds]
Oladon has joined #lisp
tonton has joined #lisp
dieggsy has quit [Remote host closed the connection]
dieggsy has joined #lisp
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
erikc has quit []
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
test1600 has joined #lisp
test1600 has quit [Read error: Connection reset by peer]
smasta has joined #lisp
Cymew has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
NingaLeaf has joined #lisp
wxie has quit [Remote host closed the connection]
epony has quit [Quit: QUIT]
wxie has joined #lisp
pagnol has quit [Ping timeout: 260 seconds]
jmercouris has quit [Remote host closed the connection]
jmercouris has joined #lisp
wxie has quit [Ping timeout: 276 seconds]
asarch has quit [Quit: Leaving]
NingaLeaf has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EvW1 has quit [Ping timeout: 255 seconds]
ckonstanski has joined #lisp
smasta has quit [Ping timeout: 240 seconds]
<beach> Good morning everyone!
<jmercouris> good morning!!
<jmercouris> are you on CET?
<beach> UTC+1
<jmercouris> Wow, you wake up super early
<beach> It's a genetic defect in my family.
<beach> I had some comments for you yesterday. You may want to check the logs.
<jmercouris> Ah okay, looking now
<jmercouris> Ah, indeed :input should not be a macro
<jmercouris> I was thinking of doing some CPS style input
<jmercouris> so basically when one sets a minibuffer binding you can just point to a function, and that function will be responsible for invoking the minibuffer
<jmercouris> I didn't know about the three semicolons, I was just going off something I googled, but I can change that
<jmercouris> Finally, what do you mean by "It is a very bad idea to define functions or macros with names in the keyword package."?
<beach> Like (defmacro :input ...)
<beach> :input is the name of the macro, and it is a symbol in the keyword package.
bms_ has quit [Quit: Leaving]
<jmercouris> is a symbol treated differently because it starts with a colon?
<jmercouris> I guess that makes sense
<jmercouris> I will be removing this macro anyway, as I think 1. it can be replaced with a function as you said, and 2. I will rewrite most functions to use CPS style so something like (with-minibuffer-input ((valuex (read-from-minibuffer))) (print valuex))
shka has joined #lisp
<beach> When the reader sees a token that starts with a colon, it creates a symbol in the keyword package.
<beach> That is how you can often pass keyword arguments to functions without using package prefixes.
Bike has quit [Quit: Lost terminal]
<jmercouris> Ah, okay that makes sense
<jmercouris> so is the keyword package literally called "keyword"?
<beach> clhs keyword
<jmercouris> okay I see, thank you for the explanation
<beach> Sure.
<beach> And the reason it is a very bad idea to create functions and macros with such names is that it could then clash with other systems doing the same.
<jmercouris> True, or what if I wanted to use a kwarg :input for example, or if anyone else is
<beach> Imagine that I want to use your browser at the same time as some editor that also creates a macro named :input, then I can't use both.
<jmercouris> it would possibly do really weird things and I would have no idea
<jmercouris> because it would put them in the same package
<beach> And that's why you stick to your own packages.
<pierpa> (package-name (symbol-package :foo)) ==> "KEYWORD"
<jmercouris> whereas if I do not include the colon, they will be in my own package
<jmercouris> Right
<jmercouris> Yeah, I am starting to get that
<jmercouris> Two days ago when writing a macro I was hitting my head against the keyboard for 15 mintues and then I realized I was in the wrong package, and that's why my macro wasn't expanding, so I'll definitely not be forgetting that macros belong to packages anytime soon :D
<pierpa> :foo is just a shorthand for keyword:foo
orivej has quit [Ping timeout: 256 seconds]
smasta has joined #lisp
p_l has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
pansninja has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
schoppenhauer has quit [Ping timeout: 265 seconds]
quazimodo has quit [Remote host closed the connection]
orivej has joined #lisp
wol has quit [Remote host closed the connection]
schoppenhauer has joined #lisp
FreeBirdLjj has joined #lisp
larme has quit [Ping timeout: 265 seconds]
larme has joined #lisp
red-dot has joined #lisp
quazimodo has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
madpengu has joined #lisp
rumbler31 has quit [Remote host closed the connection]
epony has joined #lisp
epony has quit [Max SendQ exceeded]
epony has joined #lisp
nydel has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 248 seconds]
pierpa has quit [Quit: Page closed]
larme has quit [Ping timeout: 246 seconds]
damke_ has quit [Ping timeout: 264 seconds]
nowhere_man has quit [Ping timeout: 268 seconds]
asarch has joined #lisp
nowhere_man has joined #lisp
<asarch> One very stupid question about CLOSURES. If I have (I will use square brackets just for annotations): (defparameter *fn* (let ((count 0))[1] (setf count [2] (1+ count[3])))))
<asarch> If this was C++ code, then: [1] (let ((let::count 0)), [2] (setf set::count, [3] What count is that?
<asarch> let::count or setf::count?
heurist` has quit [Ping timeout: 240 seconds]
<asarch> The clean code would be: (defparameter *fn* (let ((count 0)) (setf count (1+ count)))))
heurist`_ has joined #lisp
<pillton> Firstly, closures are functions which close over the lexical environment. Your question has nothing to do with functions.
damke_ has joined #lisp
<asarch> Sorry, a typo: (defparameter *fn* (let ((count 0)) #'(lambda() (setf count (1+ count)))))
<asarch> Ok
* asarch takes notes...
<madpengu> pillton: What?
<asarch> Does it mean that a closed lexical scope "ignores" definition from outside?
<madpengu> pillton: "closures are functions... your question [about closures] has nothing to do with functions"? How?
<pillton> clhs lexical closure
<asarch> From PCL: "However, Common Lisp's lexical variables are lexical variables with a twist, at least compared to the original Algol model."
<asarch> "For instance, you can capture the closure created by the previous expression in a global variable like this..."
<jmercouris> asarch: A closure is just a function + environment persisted to something
<asarch> Gotcha!
<madpengu> asarch: It doesn't ignores the outside scope, only that it "captures" that current ones. In `(let ((count 0)) #'(lambda() (setf count (1+ count))))` the lambda closes over the count.
<jmercouris> asarch: So I can for example say (lambda () *some-global-var*) and *some-global-var* will be "remembered" by the closure
<madpengu> So when it is referenced outside the scope of `let`, it still knows about count.
orivej has joined #lisp
<jmercouris> that is the environment part, it is saving the environment somehow
<asarch> If this was C, a closure would be a way to "export" variables outside the scope, right?
<madpengu> jmercouris: global var is global, closure is about lexical scope.
<jmercouris> madpengu: Sure, it's just an example
milanj_ has quit [Quit: This computer has gone to sleep]
<pillton> A closure is a function. Look at the definition in the CLHS.
<jmercouris> asarch: For example, if I understand you correctly, yes
<beach> asarch: That's a very strange way of putting it.
<jmercouris> A closure is not JUST a function
<jmercouris> it is a function + some state
<madpengu> jmercouris: Think of this `(defparameter *MyClosure* (let ((insideOfLet 0)) #'(lambda() (setf insideOfLet (1+ insideOfLet)))))`.
<jmercouris> madpengu: yes, I see the mistake
<madpengu> There, MyClosure is a reference to the closure which captures the insideOfLet variable.
<beach> madpengu: What on earth is that?
<madpengu> beach: Sorry, my-closure.
<madpengu> and inside-of-let.
<madpengu> But you get the idea ;)
<beach> madpengu: Your code does reflect ANY established style.
<madpengu> I know. Thus the apology.
<beach> madpengu: If you are going to show code, then at least make an effort.
<madpengu> `(defparameter *my-closure* (let ((inside-of-let 0)) #'(lambda() (setf inside-of-let (1+ inside-of-let)))))`
<madpengu> beach: Do you understand what an apology is?
<beach> madpengu: Put a space between lambda and (
<beach> madpengu: Yes, I do.
<madpengu> `(defparameter *my-closure* (let ((inside-of-let 0)) #'(lambda () (setf inside-of-let (1+ inside-of-let)))))`
<asarch> In C++: class point {public: void set_x() {int foo = 5;}}; int main() {point p; int x = 1 + p.foo; return 0} ?
<madpengu> Happy?
<beach> Sure.
<madpengu> Cool.
<beach> asarch: It is best to understand the code without referring to other languages.
Kyo91 has quit [Remote host closed the connection]
<madpengu> beach: Why? Any language that helps you understand a concept is helpful, whatever it is Engrish or Stroustrup++
<beach> asarch: In your original code, all three occurrences of COUNT refer to the same variable.
<asarch> I know, I know. But since the language model the things you can understand...
<asarch> I mean, referring to other languages
<asarch> Are the same?
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
<beach> Lexical closures do not exist in C, and (unless they added them recently) not in C++ either, so it is hard to understand Common Lisp by using those languages as examples.
<madpengu> They're added recently.
<madpengu> C++14, I think.
<asarch> C++14 was the reason I ran away from C++ :-P
<madpengu> C++14 has lots of nice stuff that you can do FP.
<beach> It would be very hard to have full lexical closures in a language without garbage collection.
<madpengu> Why run away? I am considering going back to C++ because of C++17
<asarch> Why?
<asarch> I mean, why without garbage collection?
Oladon has quit [Quit: Leaving.]
<jmercouris> How would you decrease the reference count of something in a closure?
<jmercouris> or rather, how would you know you can release something without a reference count
<beach> asarch: Because in the general case, the environment that contains the closed-over variable(s) would have to be allocated on the heap.
SaganMan has joined #lisp
<beach> asarch: But perhaps it is only allowed to have closures with dynamic extent.
larme has joined #lisp
<beach> If so they are not the "full closures" I was referring to.
<SaganMan> Hello
<madpengu> Hi SaganMan
orivej has quit [Ping timeout: 268 seconds]
wigust has joined #lisp
<SaganMan> hello madpengu
orivej has joined #lisp
<madpengu> beach: It is lambda closures, so they don't really escape the current scope and so not true "lexical closures" per se.
<madpengu> "current scope" is probably the wrong term.
sjl has joined #lisp
<beach> Yes it is.
<beach> "Extent" is the term.
<beach> So they have dynamic extent.
<madpengu> Right, Extent in terms of stack?
<beach> Sort of.
nika has joined #lisp
<beach> That is, they disappear when the current function invocation exists.
<beach> clhs glossary/extent
<asarch> Wow! I would like to have a hard-copy of the glossary
<madpengu> asarch: C-p
<pillton> The hyperspec is downloadable from Lispworks.
<pillton> Oh a hard copy.
<beach> So, I see a picture here. C++ programmers are told that they have closures, and they are told that they have garbage collection. That way, they think they have the full power of a language such as Common Lisp. I feel sorry for them.
<madpengu> beach: lol. You're a funny person.
<aeth> C++ programmers *do* have the full power of Common Lisp, or close to it.
<aeth> I'm not sure if Clasp is the full power of Common Lisp yet.
<asarch> Assembly programmers actually :-P
sjl has quit [Ping timeout: 260 seconds]
<aeth> Proof that you can do everything CL can do in C++: https://github.com/drmeister/clasp
<aeth> :-p
<madpengu> aeth: You don't even need that proof. Just show that C++ is turning complete.
<pillton> aeth: That isn't true. You can't write to a file at compile time.
<madpengu> That is all you need to have the full power of a computer, and the full power of what can be done with any language that exists and ever will...
<aeth> madpengu: But Clasp gives a good estimate about how many LoC it actually takes.
<madpengu> All Heil Alan Turing.
<asarch> I wonder if you could apply one of the pattern designs from CLOS to Assembly...
<madpengu> When we are talking about full power, LoC is out of question ;)
<beach> madpengu: You are new here, right?
<madpengu> asarch: I think one of the big downsides of lisp and relatives are that they're disjoint from reality.
<madpengu> The way you reason about problems in lisp is not even remotely similar to what is going on in a modern cpu.
<madpengu> beach: I am always new, where ever I am, for that I am not a pond water fish, my friend.
<aeth> madpengu: I reason about problems in Lisp by observing the output of (disassemble #'some-function)
<madpengu> aeth: You actually do not, you observe the output to reason about how your code works, which only reinforces my point.
<madpengu> There is a subtle difference, but a very important one nonetheless.
<jasom> madpengu: this is true of C and C++ as well
<madpengu> jasom: C++, perhaps, C? Not so much.
<jasom> madpengu: I've worked on optimizing C compilers, this is totally true
<madpengu> jasom: I see your point, now compare that to lisp.
<aeth> madpengu: But I have the luxury of disassembling a function and if it's clearly wrong, I can use one of a dozen equivalent ways of writing it. Alternatively, disassembly is a good way to see if equivalent ways of writing something truly are equivalent.
<madpengu> The idea that you reason about differently in a higher abstraction is given. C is a different abstraction than ASM (though, I always C as just a glorified crss-platform ASM) so there is ought to be a difference in how you think about a problem.
<madpengu> But, but, the logic is mostly the same.
<madpengu> Though when you talk lisp, you're not even talking about the same instructions most of the time.
<madpengu> It is a whole another cake, a whole another level.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<aeth> madpengu: The problem with C is that the world has moved on from PDP-7 assembly.
<aeth> Its assumption about how CPUs work are false.
red-dot has joined #lisp
<madpengu> aeth: Has it though? The answer is in the R of RISC.
<madpengu> But yeah, microcode and shit, I get it.
<aeth> Most software has to deal with this machine: http://ref.x86asm.net/coder64.html
<jasom> madpengu: assembly language can support multiple return values; arithmetic operations set cpu flags that are not accessible from C; most assemblies have at least one way of dealing with signed arithmetic overflows ...
<madpengu> jasom: Just because you can't reason in C the way you do in ASM doesn't mean that your reason in C isn't mostly directly translated to ASM.
<madpengu> That is not true of lisp, IMNSHO.
<jasom> madpengu: I could show you dozens of examples of C code turning into something very different from what your reasoning would expect
<aeth> madpengu: C isn't a good fit for parallel things.
<aeth> madpengu: Our modern machines are parallel in several different ways.
borei has joined #lisp
<madpengu> I am not sure if I am terrible at making my point or what is going on.
<borei> Hi all. Merry Christmas and Happy New Year !
<madpengu> But the abstraction between Lisp and CPU is orders of magnitude thicker than C and many C-like languages.
<jasom> madpengu: consider a 32-bit machine: int wordFromByte(uint8_t x[4]) { return x[0] <<24 | x[1] << 16 | x[2]<< 8 | x[3]; }
<madpengu> borei: Happy New Year and Berry Christmas.
<jasom> madpengu: that example has an undefined result on a 32-bit machine
<madpengu> jasom: Okay, and?
<aeth> madpengu: Common Lisp's iterations are, for the most part, ultimately just gotos contained within a tagbody.
<jasom> madpengu: how is that a clean mapping to assembly, where it would have a defined result for the straightforward translation to assembly (and not only defined, but the same on all architectures)
rumbler31 has joined #lisp
<borei> seem like setf method is more complecated then i thought initially, and now seems like i missed track to get understanding how does it work
<madpengu> jasom: But isn't that undefined by standard? If you don't speak proper C, don't expect proper ASM ;)
<aeth> madpengu: A lot of the complexity in CL are macros over simple things
<borei> i have two classes generic-matrix and matrix-r, first class is parent for the second one
<madpengu> Maybe at this point I can't see past the lisp abstraction, but so far, it feels thick, maybe it has to do with it being a managed env.
<aeth> An optimized pure FP language or a JIT scripting language has a lot more magic abstraction going on
<borei> i've the following generic function
<borei> (defgeneric element(matrix i j)
<borei> (:documentation "Provides access to matrix element, where i - row, j - column"))
<borei> and method
<jmercouris> +1 on what jasom says, C doesn't compile in the way you IMAGINE it would, modern day optimizations are intense
<borei> (defmethod element((matrix matrix-r) i j)
<borei> (aref (elements matrix) (+ j (* i (cols matrix)))))
<madpengu> aeth: So yeah, I think that is it, Lisp feels very Scripty because it is Managed.
<borei> works fine
<jasom> on several compilers array-referenced loops are faster than pointer-referenced loops because the optimizaer has an easier time of turning it into a decrementer loop
<jmercouris> borei: Please use a paste service, I'm having trouble reading everything
<madpengu> jmercouris: Optimizations still do what you expect it to do, maybe in a more efficient way, with lisp, I have no freaking idea what CPU is going to do. Maybe it is just me, maybe it is lisp.
<jasom> despite the fact that the naive translation of the pointer-referenced loop is faster
<borei> now i need to do setf for elements (not spamming here) - https://pastebin.com/qE26sKMR
<jmercouris> madpengu: That's not true, optimizations do NOT do what you'd expect them to do
<borei> yep yep
shaftoe has quit [Ping timeout: 264 seconds]
<rme> It doesn't sound to me like you know CL well enough to make such a judgement or to develop such intuitions.
<borei> that one doesn't work, and i have some problem with understandig where i'm wrong
damke has joined #lisp
<madpengu> jmercouris: What do you mean? if optimizations doesn't do what I expect them to do, then the compiler is broken.
<aeth> madpengu: I'm more confident in what CL is going to do than what an optimized AOT or JIT compiler is going to do because of how sophisticated some of the optimizations in some languages can get.
<jasom> madpengu: or your knowledge of C is incomplete
<jmercouris> madpengu: I mean that they are so complex that you will have trouble understanding them completely and all of their behavior
<madpengu> You guys seems to know a lot about what I know.
<rme> But why am I responding to IRC provocateurs, anyway?
<rme> Good night.
<jmercouris> Goodnight!
<aeth> madpengu: It's actually kind of a bad thing that CLs aren't automagically optimizing everything. Naive CL is going to be slow, and fast CL is probably going to look a lot like C, unless you have a lot of custom macros to abstract.
<madpengu> rme: sleep tight.
<beach> borei: The new value is always the first parameter.
<jmercouris> madpengu: If you claim to be the individual that understands all C compiler optimizations, then you are the first I have ever heard of
<beach> borei: As in (defgeneric (setf element) (new-value matrix i j))
<madpengu> aeth: "fast CL is going to look a lot like C". Yes, yes, Brilliant.
<jmercouris> Anyways, before making an argument we have to establish some axioms, I don't agree that it is an advantage to understand the underlying assembly
<borei> hi beach:
<aeth> madpengu: Except C is going to have optimizations that do crazy things and CL that looks a lot like C is going to run like C without all of those crazy optimizations turned on
damke_ has quit [Ping timeout: 264 seconds]
<madpengu> jmercouris: No one claimed that. In fact, if you require an understanding of the mechanics of an abstraction, it is a very bad abstraction.
rumbler31 has quit [Ping timeout: 248 seconds]
<aeth> SBCL is the fastest CL implementation and I haven't had a WTF moment yet in reading the disassembly.
<madpengu> jmercouris: But none the less, not being able to reason about the mechanics of an abstraction also makes it hard to grok.
<jasom> madpengu: I am, in fact, assuming I know more about C than you; it's possible I'm wrong...
<madpengu> jasom: We will never know.
<borei> wow that was simple error
<jmercouris> jasom: Did you see my messages earlier btw?
sz0 has quit [Quit: Connection closed for inactivity]
<borei> it works !
<beach> Great!
<jmercouris> borei: Yay :)
<jasom> jmercouris: about the alpha?
<jmercouris> jasom: Yep
<jasom> jmercouris: congrats
<jmercouris> tomorrow I'll make a thread on /r/programming with new screenshots etc
<madpengu> I also don't like how every conversation about lisp or most everything about here is a schlong weaving and measuring contest. lisp is great, but it is not the end of it all, people. Chill.
<jmercouris> jasom: Thank you!
<jmercouris> jasom: it doesn't persist sessions in between open/close, but it's definitely "usable" whatever that means :D
<jasom> madpengu: it's not the end of it all. However, that doesn't mean that I agree that the mapping from C to assembly is easy to understand...
<madpengu> jasom: It is not easier in contrast to lisp? seriously?
<madpengu> It is not easy in contrast to any managed language?
<madpengu> Yeah?
<madpengu> No.
<madpengu> I am going to just be mad now.
<madpengu> Oh wait... I am already mad, but you get the idea.
<borei> btw, i got some first small result with my LISP adventure - implemented multithreaded GLFW-based application (well it's hard to call applcation, but seems like im right direction :-) - sounds strange, some basic lisp aspects still a bit fuzzy.
<jasom> madpengu: To a certain regard it is a binary question; IMO any significant code in C is non-trivial to reason about the mapping to assembly
<aeth> madpengu: One thing I've noticed about IRC is that if you say something that someone thinks is incorrect, people will line up to try to correct that statement.
<aeth> I don't think that's unique to #lisp
<jmercouris> madpengu: Don't be mad, it's not worth it to be angry. Getting angry is like drinking posion to punish the person you are having a disagreement with
<aeth> I agree, no reason to be mad.
<jasom> There is a subset of C for which the mapping to assembly is quite clear, but the same is true of any lisp descended from cmucl
<jmercouris> aka CCL
<jasom> jmercouris: ccl is not in the cmucl tree; it comes from OpenMCL
<jmercouris> Damnit
<jmercouris> sorry for the misinformation :D
<aeth> sbcl comes from cmucl
<jmercouris> With that, I'm off, goodnight
<aeth> as does scl, Scieneer Common Lisp, a commercial fork of cmucl
<borei> hmm, seems like i have more questions
<borei> if i have array of double-float, and im trying to assign integer value to one of the item - im getting error wrong type
<jasom> borei: that is correct
<borei> should i do explicit type conversion or there is something more elegant ?
<jasom> borei: explicit type conversion (you can use float)
<jasom> clhs float
<jasom> e.g. (float x 1.0d0)
pjb has joined #lisp
jmercouris has quit [Ping timeout: 256 seconds]
<borei> aha, ic
madpengu has quit [Ping timeout: 260 seconds]
<asarch> Anyway. Thank you very much guys
<asarch> Thank you :-)
<asarch> See you later
<asarch> Viel Spaẞ! o/
asarch has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
frodef has quit [Ping timeout: 255 seconds]
Jarwin has joined #lisp
Jarwin is now known as Jarwin
chens has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 256 seconds]
Karl_Dscc has joined #lisp
Jarwin has quit [Ping timeout: 248 seconds]
orivej has joined #lisp
yeticry has quit [Ping timeout: 276 seconds]
yeticry has joined #lisp
LocaMocha has joined #lisp
Jarwin has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
LocaMocha is now known as Sauvin
quazimodo has joined #lisp
rumbler31 has joined #lisp
fortitude__ has quit [Ping timeout: 240 seconds]
dec0n has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
rumbler31 has quit [Ping timeout: 265 seconds]
aindilis has joined #lisp
vlatkoB has joined #lisp
wxie has joined #lisp
yeticry has quit [Ping timeout: 240 seconds]
Karl_Dscc has quit [Remote host closed the connection]
flamebeard has joined #lisp
mishoo__ has joined #lisp
Jarwin has quit [Ping timeout: 246 seconds]
Jarwin has joined #lisp
yeticry has joined #lisp
Jarwin has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 248 seconds]
Jarwin has joined #lisp
jack_rabbit has quit [Ping timeout: 265 seconds]
quazimodo has quit [Ping timeout: 252 seconds]
nika has quit []
logicmoo has joined #lisp
dmiles has quit [Read error: Connection reset by peer]
nika has joined #lisp
jack_rabbit has joined #lisp
damke_ has joined #lisp
sellout_ has quit [Ping timeout: 256 seconds]
Jarwin has quit [Ping timeout: 265 seconds]
quazimodo has joined #lisp
bkst has quit [Ping timeout: 252 seconds]
drewc has quit [Ping timeout: 240 seconds]
jibanes has quit [Ping timeout: 256 seconds]
drewc has joined #lisp
jibanes has joined #lisp
damke has quit [Ping timeout: 264 seconds]
bkst has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
shka has quit [Ping timeout: 260 seconds]
zmt00 has quit [Read error: Connection reset by peer]
zmt00 has joined #lisp
orivej has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
xaotuk has joined #lisp
earl-ducaine has quit [Remote host closed the connection]
wxie has quit [Quit: Bye.]
jfb4 has quit [Ping timeout: 265 seconds]
mishoo_ has joined #lisp
jfb4 has joined #lisp
prometheus_falli has joined #lisp
mishoo__ has quit [Ping timeout: 256 seconds]
scymtym has joined #lisp
quazimodo has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
d4ryus1 is now known as d4ryus
sellout has joined #lisp
rumbler31 has joined #lisp
quazimodo has quit [Ping timeout: 265 seconds]
schweers has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
Murii has joined #lisp
Cymew has joined #lisp
mishoo__ has joined #lisp
chens is now known as Guest83240
mishoo_ has quit [Ping timeout: 248 seconds]
Guest83240 is now known as chens
angavrilov has joined #lisp
chens is now known as Guest55869
scottj has joined #lisp
Guest55869 has quit [Remote host closed the connection]
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chens` has joined #lisp
chens` is now known as chens
SaganMan has quit [Quit: WeeChat 1.6]
schweers has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
schweers has joined #lisp
Fare has quit [Quit: Leaving]
damke has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
damke_ has quit [Ping timeout: 264 seconds]
xaotuk has quit [Ping timeout: 252 seconds]
hhdave has joined #lisp
sjl has joined #lisp
kushal has quit [Quit: ZNC 1.6.3 - http://znc.in]
jdz_ is now known as jdz
sjl has quit [Ping timeout: 276 seconds]
libreman has quit [Ping timeout: 248 seconds]
kushal has joined #lisp
kushal is now known as Guest91444
Guest91444 has quit [Remote host closed the connection]
varjag has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
kush- has joined #lisp
creat has quit [Ping timeout: 255 seconds]
igemnace has joined #lisp
creat has joined #lisp
kush- has quit [Remote host closed the connection]
_cosmonaut_ has joined #lisp
kush- has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
Jarwin has joined #lisp
pfdietz has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
libreman has joined #lisp
Jarwin has quit [Remote host closed the connection]
SuperJen has joined #lisp
pfdietz has joined #lisp
orivej has joined #lisp
JenElizabeth has quit [Remote host closed the connection]
rumbler31 has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 240 seconds]
razzy has quit [Remote host closed the connection]
peterhil has quit [Ping timeout: 256 seconds]
razzy has joined #lisp
peterhil has joined #lisp
orivej has joined #lisp
milanj_ has joined #lisp
lxpz has quit [Read error: Connection reset by peer]
lxpz has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
orivej has quit [Ping timeout: 248 seconds]
Cymew has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
red-dot has joined #lisp
nullman has quit [Ping timeout: 264 seconds]
nullman has joined #lisp
chens has quit [Remote host closed the connection]
orivej has joined #lisp
rumbler31 has joined #lisp
Cymew has joined #lisp
NingaLeaf has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
m00natic has joined #lisp
NingaLeaf has quit [Ping timeout: 260 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
nika has quit []
larme has quit [Ping timeout: 276 seconds]
nirved has joined #lisp
larme has joined #lisp
Cymew has quit [Remote host closed the connection]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
sjl has joined #lisp
terpri has quit [Ping timeout: 265 seconds]
schweers has quit [Remote host closed the connection]
damke has quit [Ping timeout: 264 seconds]
argoneus has quit [Quit: No Ping reply in 180 seconds.]
reu has quit [Ping timeout: 246 seconds]
nullman has quit [Ping timeout: 256 seconds]
argoneus has joined #lisp
reu has joined #lisp
sjl has quit [Ping timeout: 268 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
vlatkoB_ has joined #lisp
thinkpad has quit [Quit: lawl]
jstypo has quit [Ping timeout: 265 seconds]
prometheus_falli has quit [Ping timeout: 272 seconds]
vlatkoB has quit [Ping timeout: 276 seconds]
pagnol has joined #lisp
rumbler31 has joined #lisp
Cymew has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
thinkpad has joined #lisp
<logicmoo> hrrm #'PUTHASH should that be in SYSTEM or EXT ?
<Xach> yes
<beach> Heh!
<beach> Is it just me, or have there been some strange discussions here lately?
<Xach> They are complex, with imaginary components
<beach> That explains everything.
<makomo> does anyone know why (let ((*print-circle* t)) ...) doesn't work but setf-ing it before executing the body of the let does?
pilfink has joined #lisp
<beach> makomo: You are doing something wrong.
<makomo> the example for *print-circle* in clhs also uses a let and it works
<beach> makomo: Perhaps you are returning a circular structure and you expect it to be printed as if *print-circle* is true?
<makomo> beach: indeed
<makomo> oh
<makomo> hah
<makomo> that makes sense now
<beach> makomo: By the time PRINT is called, your binding is undone.
<makomo> thanks :-)
<beach> Sure.
<makomo> yeah
Cymew has quit [Remote host closed the connection]
<logicmoo> i guess almost all impls use SYSTEM::PUTHASH for their setf expansions
<logicmoo> setf expansion of GETHASH*
<beach> logicmoo: There doesn't have to be an expansion of it.
<Shinmera> Indeed, could just define a (setf gethash) function
<logicmoo> ah, yeah
<Shinmera> beach: It seems like the kinds of people and discussions going on in this channel come in waves and tides, which is why I sometimes give up on it and leave for some time.
<beach> I completely understand you.
quazimodo has joined #lisp
<logicmoo> it might better to just use /ignore on some people
<logicmoo> (such as me)
<Shinmera> I don't ignore on principle because it's not context sensitive and won't stop people from responding.
ferada has joined #lisp
<beach> I have only used it once, and it was when someone explicitly asked to be ignored so that he or she could continue discussing commercial software in freenode without my complaining about it.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<beach> Actually, that's not true. I have used it on some temporary spammers as well.
<Shinmera> If I could ignore topics rather than people that'd be something else.
<beach> That's a very good idea actually.
<Shinmera> I don't think AI is quite there yet
<beach> Not quite, no.
<Shinmera> And even then such a tool sounds rather dangerous
<Shinmera> I mean, facebook & co are already kinda doing it and the implications are scary
<beach> Then we could ignore all topics such as "I wish the Common Lisp HyperSpec were different."
<Shinmera> Or "common lisp is not popular because", "if people did X then...", "cl has to be popular", etc.
<beach> Yes, yes, and yes! :)
<_death> "lispers are..."
<Shinmera> "the lisp community is"
<beach> "is X a dialect of Lisp?"
<Shinmera> And the old classic "why is #lisp only for common lisp?"
<beach> What do you mean? Its name is #lisp, I ought to be able to talk about ANY Lisp dialect here.
ferada has left #lisp [#lisp]
<Shinmera> I fear if we keep going with this we'll turn #lisp into a ghost town :^)
<beach> OK, let's quit.
randomstrangerb has quit [Ping timeout: 248 seconds]
mingus has quit [Remote host closed the connection]
<Shinmera> I was trying to make a joke about these being the only discussions here, but yeah, enough grumpiness.
randomstrangerb has joined #lisp
markong has joined #lisp
jameser has joined #lisp
thijso has quit [Remote host closed the connection]
<jackdaniel> one could wonder, if some (stupid) question is repeated over and over again by independent people could it mean, maybe it is not that stupid but rather there is some environmental misclue
<beach> I personally think there are very few truly stupid questions.
skali has joined #lisp
skali has quit [Client Quit]
Cymew has joined #lisp
red-dot has joined #lisp
thijso has joined #lisp
<dim> IMO it's mainly people who learn better by talking and don't bother reading docs and trying things out, and come directly here to chat about it, and hopefully build a reasonable mental model of lisp before they try things out
thijso has quit [Remote host closed the connection]
<dim> so of course there's a lot of repetition, tutoring new beginners again and again... an eternal september of sorts?
thijso has joined #lisp
<Xach> I don't mind helping people through that sort of thing.
<Xach> Eternally.
<beach> Me neither, as long as they show a willingness to learn and progress.
<Xach> I do hate "This is dumb and it shouldn't be this way" and "I'm just trying to finish a class, give me the answers"
<dim> exactly, me neither, just not every day... (and I don't have proper answers that often anyway) ;-)
<dim> some 15 years ago I would complete a friend's lisp assignements (he was sharing them on IRC) using librep (the kind-of lisp implementation for sawmill, then sawfish), it was fun times
<dim> I didn't share the answers, mind you, only some approaches
<Xach> librep was one of my gateways to CL
<dim> http://librep.sourceforge.net/ still exists, it seems
<makomo> i, for one, appreciate that you guys answer (nooby) questions over and over again because even though i have no problem reading formal references/docs, sometimes an actual dialogue with another human being helps in clarifying stuff
<logicmoo> for myself the very advanced concepts are easy.. but very basic ones are not example of a basic one i have right now i do not think i found covered in books.. "would it be better to define symbols say in My-IMPL-SYS:*COMMANDLINE-ARGS* and have them reexported to EXT"
<Xach> Perhaps because they don't matter very much.
<logicmoo> (i mean to say it might not be that simple of a question on but i think it is simple that if i have to ask.. then i really dont need to know)
<Xach> Just pick one and do it, change it later if it sucks.
<makomo> don't get trapped in analysis paralysis :D
<logicmoo> i think that is the problem with most of my questions over the years
<logicmoo> i am always using irc to avoid/skip out of analysis paralysis
<makomo> i think it's one of the fundamental problems of programming
<dim> also CL provides so many ways to do things, sometimes it's hard to guess if you're going to be stuck because of a simple choice
<makomo> people should be taught early to recognize such situations and how to deal with them
<dim> I think Xach summary is good: try it and see
<_death> (random-elt alternatives)
<_death> for more advanced use, see screamer
<dim> it's not always very costly to change your mind
<Xach> screamer!
<makomo> dim: i agree, that's usually what should be done. just go with it, don't think, do it.
schweers has joined #lisp
<logicmoo> ok1.. me makes a package called "SYSEXT" and nicknames it SYSTEM and EXTENSIONS .. while i am compiling all of ECL's ABCL's, and CLISP, and GCL systems to get a big ball of non interpreted functions
Kevslinger has joined #lisp
<logicmoo> afterwards I will probly just put it all into system, then see what most of them vote belongs in EXTENSIONS
nullman has joined #lisp
rumbler31 has joined #lisp
<logicmoo> so far each lisp, supplies a different 70% (from the others) that ends up being ideal in my system
<logicmoo> the hardest part in all of this is allowing myself is when i have to give up one or more of an individual well thought patterns by an impl
rumbler31 has quit [Ping timeout: 276 seconds]
<logicmoo> some define (setf gethash) others never do
<jackdaniel> I scream, you scream, we all scream for ice cream
narendraj9 has joined #lisp
broccolistem has quit [Read error: Connection reset by peer]
broccolistem has joined #lisp
<logicmoo> i have to say .. so far ECL is my favorite :)
<otwieracz> What's the proper way of sending file over REST with Clack/ningle?
randomstrangerb has quit [Ping timeout: 248 seconds]
randomstrangerb has joined #lisp
<otwieracz> Ok, it handles #P properly. :)
<antoszka> otwieracz: can you paste a snippet of how you've actually done it?
<otwieracz> antoszka: ningle handles PATHNAME correctly. So when your route returns PATHNAME, then instead of somehow-sending-it it streams contents of the destination.
<antoszka> ok
<otwieracz> (or 404)
JuanDaugherty has joined #lisp
DeadTrickster has joined #lisp
malice has joined #lisp
reverse_light has quit [Remote host closed the connection]
gtuser has joined #lisp
Cymew has quit []
<Xach> /win 3
_cosmonaut_ has quit [Ping timeout: 276 seconds]
<JuanDaugherty> hmm?
<JuanDaugherty> (assume wrong window)
jstypo has joined #lisp
pagnol has quit [Read error: No route to host]
rumbler31 has joined #lisp
randomstrangerb has quit [Ping timeout: 248 seconds]
dddddd has joined #lisp
randomstrangerb has joined #lisp
kush- is now known as kushal
kushal has quit [Changing host]
kushal has joined #lisp
<gtuser> leading space
makomo has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Ping timeout: 246 seconds]
<gtuser> in #python, that's a syntax error
wxie has joined #lisp
pilfink has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
Tobbi has joined #lisp
wxie has quit [Quit: Bye.]
sjl has joined #lisp
pilfink has joined #lisp
rumbler31 has joined #lisp
madpengu has joined #lisp
rumbler31 has quit [Ping timeout: 264 seconds]
Cthulhux` has quit [Quit: ne praeteriverit priusquam obesa cantaverit]
makomo has joined #lisp
jstypo has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
nullman has quit [Ping timeout: 265 seconds]
nullman has joined #lisp
gravicappa has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
damke has joined #lisp
narendraj9 has quit [Read error: Connection reset by peer]
madpengu has quit [Quit: Page closed]
damke_ has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
orivej has joined #lisp
damke has quit [Ping timeout: 264 seconds]
jstypo has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
yeticry has quit [Quit: leaving]
yeticry has joined #lisp
oleo has joined #lisp
warweasle has joined #lisp
nika has joined #lisp
Tobbi has quit [Remote host closed the connection]
Tobbi has joined #lisp
kami has joined #lisp
<kami> Hello
epony has quit [Read error: Connection reset by peer]
damke has joined #lisp
<warweasle> kami: Hi
epony has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
epony has quit [Client Quit]
rippa has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
crsc has joined #lisp
<crsc> hi
red-dot has joined #lisp
<beach> Hello crsc.
<phoe> #' car
<phoe> I was slightly surprised that this works
<beach> The recursive call to READ skips whitespace.
rumbler31 has joined #lisp
<beach> crsc: Are you new here? I don't recognize your nick.
<crsc> beach: Yes, I'm new here and new to Common Lisp.
<beach> Welcome then.
<crsc> Thank you. :-)
<Bike> phoe: #' is basically defined to return `(function ,(read)), so yeah, whitespace is no prob.
<phoe> Bike: yes, I was just, "wait, doesn't it... oh, oh, wait"
<phoe> crsc: welcome! got your first day kit yet?
<phoe> crsc: grab it here, https://portacle.github.io/
<crsc> phoe: The second day for me. Okay, I'll take a look on that.
<phoe> crsc: and here's the other part, http://www.gigamonkeys.com/book/
<crsc> phoe: I use vi more than 20 years now and it's hard to learn emacs. But I'll give it a try.
<phoe> crsc: oh, in this case
<crsc> Yes, I know the second link. Thanks.
<phoe> you might want to check https://spacemacs.org out since it's based on emacs's evil mode.
<crsc> Thanks again.
<phoe> or, alternatively, set up an environment with vim and slimv.
FreeBirdLjj has quit [Remote host closed the connection]
<phoe> portacle has an upside of being self-contained, but if you have 20 years of vim experience, then I'm pretty sure you can hack your own environment up pretty quickly. (:
trittweiler has joined #lisp
<phoe> also, #lisp is a good place for Lisp questions but #clnoobs has been created specifically for CL learners.
<crsc> Yeah, definitely. :-)
<Shinmera> I mean you can install evil to Portacle easy enough
<warweasle> I'm still surprised CL doesn't have an editor written in CL.
<Shinmera> It does
<Shinmera> Multiple ones, even
<warweasle> Shinmera: ?
<Shinmera> Problem is they're all unfinished and kinda suck compared to Emacs.
<Shinmera> warweasle: See Hemlock, Climacs, etc.
<warweasle> Oh. Right, even I tried writing one. In 3D!
FreeBirdLjj has joined #lisp
|3b| has quit [Ping timeout: 252 seconds]
<Xach> I liked Hemlock.
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<Xach> Uncanny valley was a problem for me though.
<Bike> i'm hoping this means hemlock has a "clippy" that's a _nearly_ photorealistic human
<Xach> More like it's close enough to emacs that the little differences are really distracting and offputting.
<Xach> also a problem: crashing
<Xach> haven't tried again in many years, though
LiamH has joined #lisp
SaganMan has joined #lisp
<jdz> More users would definitely have helped with ironing out the crashes.
<jdz> What we have here is a chicken and egg problem.
<warweasle> I wanted a mixture of blender and emacs. It was too large a project for one person.
EvW has joined #lisp
<warweasle> Too large for me anyway.
FreeBirdLjj has joined #lisp
<jdz> Too many yaks to shave.
papachan has joined #lisp
<makomo> crsc: i can also recommend spacemacs, it's what i'm using :-)
<crsc> makomo: Yes it looks very fine. I'll give it a try.
<makomo> are there any other CL channels apart from #lisp, #lispgames and #clnoobs?
<pjb> makomo: why don't you read cliki?
<beach> makomo: #clasp is about the Clasp implementation of Common Lisp and #sbcl about SBCL.
<beach> makomo: #clim is about the Common Lisp Interface Manager.
<makomo> beach: i've been in #clasp since i've been in #lisp. in fact, it's what drove me to start getting into CL more :-)
<makomo> i saw drmeister's talk on youtube once and was amazed
<makomo> since i come from C++ and got intrigued by lisp, the combination seemed awesome to me
<beach> I see.
pilfink has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<makomo> it's the same kind of feeling i got when i first found spacemacs i think
<makomo> i.e. the combination of emacs and vim is what's the best, not one or the other :-)
<makomo> same with C++/Common Lisp, although they're pretty different languages so the comparison doesn't transfer that well
<beach> The two have very different features and very different semantics.
<crsc> makomo: https://github.com/l04m33/vlime This looks nice at a first view.
<makomo> crsc: i was going to recommend that you look into those too, but forgot
<crsc> :-)
<makomo> however, spacemacs comes with full vim keybinds set up for you (which is why i started using it myself) ;-)
<makomo> so it won't be that hard to learn at all
FreeBirdLjj has quit []
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
<sjl> crsc: I use vlime. it's pretty good.
<crsc> sjl: Nice to know. I'll test it later at home on my PC.
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<flip214> sjl: did you hear anything from the vlime author since november?
<sjl> flip214: no, but I haven't really been paying attention. I've been traveling a lot over the holidays.
<flip214> I had a few email exchanges re bugs and features, but got no replies for ~.52 months.
<flip214> sorry, 2.5 months
<flip214> I'm afraid that something bad happened... perhaps by drawing attention via the emails
<sjl> I don't know. I haven't heard anything
<flip214> hmmm
<flip214> that's bad
<sjl> I didn't have a lot of communication with them though. Never outside of GH issues.
<sjl> So me not hearing anything isn't a very important data point.
<flip214> the github contribution picture at https://github.com/l04m33 breaks off at the same time
<sjl> It's possible they're just taking a break from computer work for a while. I've done it for a couple of months at a time in the past.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
randomstrangerb has quit [Ping timeout: 240 seconds]
red-dot has joined #lisp
randomstrangerb has joined #lisp
dec0n has quit [Read error: Connection reset by peer]
Jen has joined #lisp
eivarv has joined #lisp
SuperJen has quit [Ping timeout: 248 seconds]
trittweiler has quit [Read error: Connection reset by peer]
trittweiler has joined #lisp
fortitude has quit [Quit: Leaving]
kami has quit [Ping timeout: 240 seconds]
flamebeard has quit [Quit: Leaving]
FreeBirdLjj has joined #lisp
turkja has quit [Ping timeout: 276 seconds]
hexfive has joined #lisp
trittweiler has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullman has quit [Ping timeout: 260 seconds]
terpri has joined #lisp
nullman has joined #lisp
fortitude__ has joined #lisp
asarch has joined #lisp
test1600 has joined #lisp
<asarch> Good morning!
<beach> Hello asarch.
<asarch> I couldn't sleep last night, everything was in my head was CLOSURE.
<beach> Sorry to hear that.
<asarch> But I finally could understand the concept. From the point of view of JavaScript: "A closure is created when a function inside another function gets stored outside the outers function's scope while retaining references to a variable from the outer function".
etimmons has left #lisp [#lisp]
<asarch> So, if real life could apply closures, a closure would be like a photograph. Even when the people in the photograph have gone, you can "reference" to them by the picture
<beach> Maybe you should write a book on programming, containing such explanations.
<asarch> So, my next question is, why would you need closure? You could easy store the return value from a function in a variable
nullman has quit [Remote host closed the connection]
nullman has joined #lisp
<beach> asarch: Consider this one: (let ((x 0)) (lambda () (incf x)))
<asarch> Ok
* asarch gets his pen...
<beach> asarch: When that form is evaluated, it returns a function of zero arguments, that, whenever called, returns a larger value.
FreeBirdLjj has quit [Remote host closed the connection]
<beach> So the function/closure contains state in its environment, in this case, the value of the variable X.
<asarch> Ok
<cgay> portacle...neat
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<asarch> #<CLOSURE (LAMBDA ()) {1001E5424B}>
<beach> asarch: Yes, now do (funcall <that closure>) several times.
<pjb> asarch: closures are equivalent to objects.
<pjb> asarch: this is the encapsulation of some data with some code.
hexfive has quit [Read error: Connection reset by peer]
<beach> If you are not using SLIME, start with (defparameter *f* (let ((x 0)) (lambda () (incf x)))).
<beach> asarch: Then do (funcall *f*) several times.
<pjb> You can call the code, the code can process the data, but you cannot touch the data directly from outside.
<asarch> I follow your advice and I use SBCL
<Xach> Here is an involved use of closures
* Xach reads about sbcl 1.0 and an iBook g4 and gets a misty feeling
hexfive has joined #lisp
fortitude__ has quit [Ping timeout: 265 seconds]
* cgay reads russian ads on xach.livejournal.com
<Xach> Sorry. I need to migrate all that stuff, but it feels like it might be a lot of work :(
<pjb> asarch: so the CL operator FUNCTION is the basic operator to create objects in CL.
<domovod> Russian advertising does not exist :-)
<cgay> Actually it completely blocks the first paragraph or so. :(
nullman has quit [Ping timeout: 248 seconds]
<asarch> (dotimes (x 10) (funcall *f*))
nullman has joined #lisp
<beach> asarch: *f* does not print anything, so you need to do something like (loop repeat 10 collect (funcall *f*))
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
<pjb> (let ((x 0)) (lambda () (incf x))) is equivalent to (defclass anonymous ((x :initform 0 :accessor x))) (defmethod m ((o anonymous)) (incf (x o))) (make-instance 'anonymous)
<beach> I don't think that is going to help asarch at this point though.
<pjb> How would (defparameter *f* (make-instance 'anonymous)) (dolist (i 10) (m *f*)) print anything?
<asarch> Don't worry, I'm saving it for later
* asarch takes notes of everything
EvW has quit [Ping timeout: 255 seconds]
stee_3 has quit [Ping timeout: 256 seconds]
stee has joined #lisp
<_death> could inspect the closure.. C-c I *f* RET
<asarch> #<CLOSURE (LAMBDA ()) {1001E73B9B}>
<beach> asarch: Did you try the LOOP I suggested?
junxit has joined #lisp
<pjb> or: (let (r) (dotimes (i 10 r) (push (funcall *f*) r))) #| --> (10 9 8 7 6 5 4 3 2 1) |#
<asarch> beach, of course!: (12 13 14 15 16 17 18 19 20 21)
<beach> asarch: So you see that the closure contains state. That's what closures are for.
hexfive has quit [Remote host closed the connection]
stee is now known as stee_3
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
attila_lendvai has quit [Client Quit]
stee_3 has quit [Quit: stee_3]
nika has quit [Quit: Leaving...]
al-damiri has joined #lisp
Karl_Dscc has joined #lisp
<beach> asarch: Are you ready for another example?
red-dot has joined #lisp
<asarch> I see
<asarch> Of course!
jmercouris has joined #lisp
<asarch> I'm always ready
<beach> OK, let's say we have some example list like (defparameter *l* (loop for i from 0 below 10 collect i))
<beach> It contains integers from 0 to 9.
<asarch> Ok
<beach> We can use REMOVE-IF-NOT to keep only elements that correspond to a certain predicate. For instance, we can say (remove-if-not #'oddp *l*)
<beach> It will keep all the elements.
<beach> that are odd.
<beach> Now suppose we want to keep all the elements that are greater than (say) 3.
<beach> We can do: (remove-if-not (lambda (x) (> x 3)) *l*)
<beach> Right?
SaganMan has quit [Quit: WeeChat 1.6]
<jmercouris> Hey everyone, I just released the alpha GTK port of nEXT, if you like my project, please upvote it: https://www.reddit.com/r/programming/comments/7p8nv0/next_browser_a_powerful_extensible_lisp_browser/
<jmercouris> Thanks for your time!
<asarch> Right
<beach> asarch: But now we want to generalize this so that we want a function F that takes an integer N and a list L and that keeps all the elements of L that are greater than N.
<asarch> Ok
<beach> asarch: We can do it like this: (defun f (n l) (remove-if-not (lambda (x) (> x n)) l))
<beach> asarch: So that (f 3 *l*) gives the same result as before.
<beach> asarch: Right?
<asarch> Right
<beach> asarch: Here, (lambda (x) (> x n)) is a closure, because it refers to the lexical variable n in a surrounding function.
hexfive has joined #lisp
JonSmith has quit [Remote host closed the connection]
hhdave has quit [Ping timeout: 256 seconds]
karswell has quit [Read error: No route to host]
<asarch> I see
<beach> asarch: Here we use the closure to refer to an implicit parameter. The function that we pass to remove-if-not must take a single parameter, but we need two parameters, both the X that receives elements from the list and N which is what we passed to F. The solution is to create a closure with a single parameter X that refers to a closed-over variable N.
<asarch> Wow! That's why Lisp actually changes the way you do things
<_death> furthermore you can create a predicate-building function.. (defun greater-than (n) (lambda (x) (> x n))) this makes it possible to write (remove-if-not (greater-than 3) list)
attila_lendvai11 has joined #lisp
<asarch> In the chapter 3 of the PCL I see this way of do things
<asarch> The way you generalize functions
<phoe> (remove-if-not (curry #'< 3) list)
<phoe> ;; that's the next step, after understanding closures
<beach> asarch: As _death points out, with this style, you obtain a collection of very small, very general, functions that you can then compose arbitrarily.
<_death> phoe: the next step would be (remove-if (complement (greater-than 3)) list) ;)
markong has quit [Ping timeout: 248 seconds]
attila_lendvai42 has joined #lisp
<beach> asarch: In a language without closures, you can't do this, because you would have to alter the signature (the number of parameters), and doing so would break the abstraction barriers, so the code is no longer modular.
attila_lendvai11 has quit [Quit: Page closed]
<pjb> You can do it trivially in object oriented programming languages, trivially, but with a lot of boilerplate.
<dlowe> sure, iirc, closures in java 8 creates an anonymous class with the free variables as stored members.
<pjb> But then, given the above equivalence, "language without closures" excludes OOP languages.
<asarch> Yeah, since this concept actually doesn't exist in other language, it would take you more more time to do simply things
<_death> in the past a limited form of "closures" was supported ("downward funargs").. but nowadays there's usually no need to distinguish function from closure (yes, there are exceptions when talking about performance, serialization, etc.)
margeas has joined #lisp
<makomo> jmercouris: very interesting project, nice! :-)
<makomo> what would be a good way to capture the result of a cond clause's test-form?
<makomo> something like the anaphoric "it"
m00natic has quit [Remote host closed the connection]
<makomo> what's the usual way such a thing is done?
<pjb> I use let.
<dlowe> well, there's acond to answer your question directly
<_death> makomo: an old idiom is ((setq the-result (the-test)) (use the-result))
<pjb> (cond ((let ((x (predicate))) (when x (do-something x) t))) …
<makomo> yeah, but it isn't part of the standard right :^(
<dlowe> but I've used (let (foo) (cond ((> (setf foo (calculation)) 5) ...)))
<makomo> pjb: oh, so you (ab)use the test-form to do the resulting computation
<pjb> yes.
<pjb> The alternative being to use setf.
<makomo> i'll go with the setf i guess
<jmercouris> makomo: Thank you!
<jmercouris> makomo: It's been around a year of work, so not too long, but also not a trivial investment :D
<phoe> to be absolutely honest
<makomo> jmercouris: i've seen it a few weeks ago too but forgot you were the author. it was influenced by emacs i see, which is very neat
<phoe> (let ((value (predicate))) (cond (predicate ...) ...))
<phoe> is what I do
<makomo> i was thinking of a general framework for building emacs-like applications from time to time
<jmercouris> makomo: Yeah, I try not to bring all the baggage of emacs though, but trying to keep it close enough
<phoe> it separates the actual computation from the branching, which seems cleaner and more beautiful to me.
<phoe> uh
<jmercouris> makomo: lol, this could be the new "electron" for emacs applications :D
<jmercouris> ah that's terrible :D
<phoe> (cond (value ...) ...) I mean
<makomo> i.e. the standard "you have a minibuffer, you can run commands, you have keybinds and the lisp image of the process at your hands!"
<makomo> jmercouris: haha, exactly! :D
<beach> That is precisely what ESA does.
<dlowe> phoe: what about when you want to do the computation only on one branch, and you don't really want to nest conditions
<beach> ESA means Emacs-Style Application, and it's part of McCLIM.
<makomo> beach: oh wow
shka has joined #lisp
<makomo> jmercouris: nEXT uses gtk from what i've seen?
<makomo> and heard in this channel
<dlowe> phoe: a classic example is (cond ((string= input "") ... no input ...) ((null (setf num (parse-integer input :junk-allowed t))) ... bad input ..) (t use num for stuff)
<jmercouris> makomo: Correct
<jmercouris> makomo: Though, not strictly GTK, it also uses Cocoa
<jmercouris> It can be ported to use just about any GUI framework as there is an API between the core and GUI that is extremely simple
<phoe> dlowe: can you pastebin this for me? I think I need to read it formatted to understand it
<jmercouris> the GTK port took me just 2 weeks, and most of that time was because I don't know GTK
<dlowe> phoe: sure :)
<makomo> jmercouris: oh nice
<Xach> fiddlerwoaroof_: i don't use brew :~(
<asarch> Wow! Thank you Masters
<asarch> Thank you very much :-)
markong has joined #lisp
margeas has quit [Ping timeout: 260 seconds]
<dlowe> omg, no more lisppaste
<dlowe> pour one out
<jmercouris> dlowe: lol
<Xach> I don't really miss it like I thought I would.
<Xach> Gist is pretty easy, and it seems like there are plenty of others.
<asarch> BTW, SBCL has changed its version: SBCL 1.4.3, released December 29, 2017
<jmercouris> I have gist integrated into emacs
<Xach> asarch: o happy day!
<jmercouris> really good: https://github.com/defunkt/gist.el
<jmercouris> who are the developers of SBCL?
<jmercouris> are they on this channel?
<phoe> jmercouris: #sbcl
<jmercouris> Ah, okay
<asarch> There is a big party at #sbcl
<phoe> dlowe: dirty. but useful.
schweers has quit [Ping timeout: 265 seconds]
EvW1 has joined #lisp
<dlowe> I don't think it's *that* dirty.
<_death> what about that Arpanet mail address
<phoe> dlowe: isn't that dirty, yeah.
<dlowe> phoe: I mean, compare with the alternatives :)
<borei> hi all !
<phoe> hey borei
<phoe> dlowe: (:
epony has joined #lisp
<shka> good evening
epony has quit [Max SendQ exceeded]
epony has joined #lisp
<borei> i have question about memory management in lisp. If for example my function is returning array what would be proper solution for this task - request array in the calling function and supply it as one of the argument and then fill with data, or just create array in the called function and then return it ?
<Xach> borei: good question! both approaches are ok. in some situations it is better to do one, some the other.
osune has joined #lisp
<Xach> borei: If your system has to be more strict about creating new things and using memory, passing arrays in to be populated can provide more control.
<Xach> borei: but much of the time it is ok to create things as they are needed.
<pjb> most of the time, it will be easier and FASTER to allocate them.
<_death> you can have both
BitPuffin has joined #lisp
<Xach> yes indeed
<borei> but, speaking about second option, will that array be cleaned up by GC after called function completed ?
<Xach> borei: oh, certainly.
<phoe> borei: depends
<Xach> borei: not when it completes, but when it is no longer used
<pjb> borei: the GC only works on objects that are not accessible anymore.
<phoe> STATIC-VECTORS are a case where you'd want to pass an array to a function instead of creating a new one.
<phoe> since they're pretty damn efficient and very easy to utilize from inside CFFI.
<Xach> static-vectors is an advanced topic you can ignore
<pjb> So in all cases, as long as you keep references to the data, it won't be freed.
<phoe> ...and from inside lisp.
<osune> I'm sorry but to ask such a simple question but I cannot comprehend at the moment the use case for FIND-IF. Or how it differs from FIND. Can somebody please state the obvious for me?
<phoe> Xach: d'oh
<pjb> (find-if (lambda (x) (> x 3)) '(1 2 3 4 5 6 7 8)) #| --> 4 |#
<Xach> osune: imagine you want to find any odd number instead of a specific one
<Xach> osune: you could use (find-if 'oddp ...) instead of (find 3 ...)
<pjb> (find 4 '(1 3 5 7 9)) #| --> nil |#
<phoe> osune: FIND searches for an object that is EQL to something. FIND-IF searches for an object that satisfies a predicate function.
<phoe> EQL can be exchanged for a different test function, but that's the default.
EvW1 has quit [Ping timeout: 246 seconds]
hexfive has quit [Read error: Connection reset by peer]
<osune> but I can provide a :test #'oddp for FIND?
<pjb> (find-if #'digit-char-p "Hello 42th world!") #| --> #\4 |#
<phoe> osune: you'll get an error.
<phoe> The function for :TEST expects two arguments.
<pjb> osune: :test must be a binary function.
<osune> uhhhhh
heurist`_ is now known as heurist
<phoe> The predicate for FIND-IF expects one argument.
<phoe> FIND works via repeatedly executing things like (EQL x y).
<Xach> osune: it is true that sometimes functionality overlaps, and you could write a :test that would do what find-if does, but it would be pretty convoluted
<phoe> FIND-IF works via repeatedly executing (FUNCALL predicate x).
<phoe> Both of them return immediately when they get a non-null result.
hexfive has joined #lisp
<borei> tks guys !
<_death> FIND is similar to (find-if (lambda (hay) (funcall test hay needle)) ...), disregarding certain details
<phoe> Xach: I just realized a thing.
<Xach> spill it
<osune> So i would have to 'workaround' with a lambda (x, y) (oddp x) or equivalent to use FIND. Thanks I wasn't able to grasp that at the moment and I started to get annoyed.
<phoe> The moment I mention a thing to answer a basic question and other people go "that's advanced stuff, disregard it", I don't think I'm a newbie anymore.
<Xach> ok!!
<osune> well yes that's the reverse definition of "newbie" :)
<phoe> kinda
<Xach> phoe: I think sometimes when trying to help it can be hard to separate the "applicable knowledge" from the "necessary knowledge" for a situation
<Xach> static-vectors info is applicable but i think not necessary
<phoe> Xach: correct.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<phoe> I think that I am just sore on that spot right now
<phoe> after not using static-vectors made my library 40000% slower than it should be
<phoe> (this is not a made up number)
red-dot has joined #lisp
attila_lendvai42 has quit [Ping timeout: 256 seconds]
emaczen` has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
nowhere_man has quit [Ping timeout: 240 seconds]
nowhere_man has joined #lisp
<Shinmera> I was just reminded that I started writing a plaster.el . I guess I'll take that as a small project between exam studying.
bitch has quit [Ping timeout: 248 seconds]
bitch has joined #lisp
bitch has joined #lisp
bitch has quit [Changing host]
bitch has joined #lisp
attila_lendvai42 has joined #lisp
jmercouris has quit [Read error: Connection reset by peer]
jmercouris has joined #lisp
Oddity has quit [Ping timeout: 248 seconds]
Arcaelyx has joined #lisp
josemanuel has joined #lisp
Oddity has joined #lisp
RichardPaulBck[m has left #lisp ["User left"]
RichardPaulBck[m has joined #lisp
varjag has joined #lisp
jstypo has quit [Ping timeout: 268 seconds]
nydel has joined #lisp
malice has quit [Remote host closed the connection]
JonSmith has joined #lisp
thijso has quit [Ping timeout: 268 seconds]
test1600 has quit [Ping timeout: 260 seconds]
bgardner has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
Sauvin has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 264 seconds]
Murii has quit [Quit: WeeChat 1.4]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
gravicappa has quit [Ping timeout: 252 seconds]
attila_lendvai42 has quit [Ping timeout: 260 seconds]
<d4ryus> hey #lisp, could someone tell me the difference between usocket and iolib?
<dlowe> usocket is a wrapper for socket operations
<dlowe> iolib is a full event multiplexer for managing lots of io operations and timed events
<d4ryus> dlowe: thanks
hexfive has quit [Remote host closed the connection]
<Shinmera> iolib also requires libfixposix, whereas usocket is a pure-CL socket solution.
attila_lendvai42 has joined #lisp
BitPuffin has quit [Remote host closed the connection]
Kaisyu has quit [Quit: Connection closed for inactivity]
<jasom> and usocket works on windows, I don't think iolib will
orivej has quit [Ping timeout: 248 seconds]
<phoe> d4ryus: (over)simplifying things a real lot: usocket is portable, iolib is performant.
moei has quit [Quit: Leaving...]
<Shinmera> I don't think that's a good way to put it at all
<Xach> I've been interested in basic-binary-ipc for quite some time too.
<Shinmera> iolib has a different scope and approach.
<jasom> +1 for basic-binary-ipc
smasta has joined #lisp
<jasom> though note that the overlapped-io driver on windows is under-exercised (it works as far as anyone knows, but it hasn't been used as heavily as the epoll driver, so there may be some latent issues)
papachan has quit [Ping timeout: 252 seconds]
<jasom> though that information is like 2 years old; pillton might know if it's being used more these days
damke has joined #lisp
* jasom remembers considering writing something like basic-binary-ipc but then thinking "that's a lot of boring, thankless, slog-work."
<jasom> I'm always impressed with people that can finish projects like that
<Shinmera> Speaking of things like that, I've been considering writing a github API client, but just the thought of dealing with oauth2 is making me cringe.
<Shinmera> Will probably just bash my head through it eventually anyway though, if my past record is anything to go by.
hexfive has joined #lisp
<Shinmera> If I wanted to be fully future proof I'd probably have to implement the v4 though, which uses GraphQL.
damke_ has quit [Ping timeout: 264 seconds]
<Xach> Shinmera: so i have one called "githappy" and you can plug in a token from the dev site to get full rate querying without going through oauth2
<jmercouris> It was reccomended to me to use https://github.com/flathub to distribute nEXT, any feedback on this?
<Shinmera> Looking at that spec made my eyes glaze over though, so that probably won't happen
<Xach> Shinmera: I use it to do all github-related quicklisp stuff (which isn't much yet)
<jmercouris> Shinmera: There's already a few emacs github apis clients, why do you want to write one?
<Shinmera> Xach: Ah, neat.
<Shinmera> jmercouris: Because I don't want to write elisp?
<Shinmera> And because my programs aren't written in elisp
<Shinmera> Xach: Is that for the v3 API?
<Xach> Shinmera: yeah
<d4ryus> jasom, phoe, Shinmera: Thank you
<Shinmera> Xach: Alright, I'll see if I can convince myself to just extend/use that.
<Xach> I understand if the result is "no", as it is not documented or high-level.
papachan has joined #lisp
<jmercouris> Shinmera: True, who does enjoy writing in elisp :D
<Shinmera> Xach: The purist in me is hoping I'll write yak-shave a GraphQL library and then use V4, but we'll see.
<jmercouris> You should call it yak-razor
<d4ryus> I have been using usocket, but iam missing stuff like checking how many bytes i can read from a socket without blocking.
pjb has quit [Ping timeout: 265 seconds]
<Shinmera> You can at least check whether there's anything to read or not without blocking
<d4ryus> Shinmera: yes, but that would suggest reading single bytes :/
<Shinmera> Huh? Why?
<d4ryus> Because a byte is the least amount available
<Shinmera> Yeah but you'll send messages in chunks rather than individual bytes, yeah?
<Shinmera> So when there's input available you read an entire message.
<d4ryus> yes, true. but that could be abused.
<Shinmera> How?
<d4ryus> once i do a read-line, or read-sequence n and the other end sends less bytes then i expect, my client hangs
<Shinmera> Are you hoping to do everything in a single thread or something?
bms_ has joined #lisp
<d4ryus> yep, that would be the goal
<Xach> d4ryus: You should not use read-line and read-sequence, then.
<phoe> I went around this by using peek-char-no-hang
nullman has quit [Ping timeout: 248 seconds]
<Shinmera> Whatever for? Having a socket reader thread and a queue for messages is not a big deal.
<Xach> d4ryus: use interfaces that read as much as is availble and return.
<d4ryus> Xach: interfaces like?
nullman has joined #lisp
<Shinmera> phoe: read-char-no-hang does not help here.
<Shinmera> And reading char by char is atrocious for performance, especially if you do the no-hang variant.
<d4ryus> yes, like shinmera said, that would be reading single bytes
pagnol has joined #lisp
<phoe> ayup, but I doubt you can do better with usocket.
<d4ryus> Xach: which interfaces exist that read only as much as is available?
<Shinmera> Using a thread and checking for input before reading a full message works perfectly fine.
<Xach> d4ryus: I'm not sure what is portable, but sb-bsd-sockets:socket-receive I think will do the trick.
makomo has quit [Quit: WeeChat 1.9.1]
frodef has joined #lisp
<d4ryus> Xach: looking into that, thank you
<dlowe> I have some code floating around using iolib that opens a non-blocking socket, reads into an expanding buffer on input, and runs a callback function when a full line is read.
<Shinmera> The API I'd prefer instead is having a read-timeout available.
<dlowe> It's not particularly hard.
<d4ryus> Shinmera: yes thats my current solution. Iam creating a thread for each connection, those get terminated in case they hang on read-sequence
<d4ryus> Shinmera: usocket allows you to set timeouts
<Shinmera> Oh, it does?
<Shinmera> Hmm
<Shinmera> Why do I explicitly remember not seeing that
wigust_ has joined #lisp
<d4ryus> yes, checkout option.lisp
<Xach> I've often thought about a portability layer that does not try to pretend sockets are streams, and just offers read-octets, write-octets and a few other things.
<Shinmera> Ah, it was added after I first started using Usocket I think
wigust has quit [Ping timeout: 246 seconds]
<Shinmera> So much for the ecosystem being stagnant!
<Xach> I've had that happen with cl-ppcre! It grew special processor options for register-groups-bind after I learned how to use it.
<d4ryus> :D but stuff inside option.lisp is not too platform-independent
omilu has joined #lisp
<Shinmera> d4ryus: Every other line is a reader conditional. I think that's pretty dependent.
<Shinmera> I actually wonder why it was done this way rather than having each function defined in the platform specific file.
<Shinmera> :/
<d4ryus> Shinmera: yes, true. but most platforms are not implemented.
<Shinmera> I see clisp, ccl, cmucl, ecl, lw, and sbcl for read timeout. Good enough for me!
<phoe> abcl could be done as well, but eh
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
attila_lendvai42 has quit [Ping timeout: 265 seconds]
red-dot has joined #lisp
thijso has joined #lisp
shka has quit [Ping timeout: 248 seconds]
<logicmoo> hrrm I noticed most all impls dont have private symbols in COMMON-LISP though most all describe the lambda list arguments that might have appeared in COMMON-LISP package as comming from their respective impl packages symbol examples are TEST,TEST-NOT,BODY etc
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<logicmoo> so i am trying to decide .. if i might just leave CL::TEST in the way ABCL does
<Shinmera> Who cares?
<logicmoo> or was there a reason everyone else scrubs out their CL non exported symbols?
<Shinmera> Uh, typically there's no reason to put symbols in there other than those that are exported to begin with
scymtym has quit [Ping timeout: 255 seconds]
<logicmoo> (some dont scrub them out they are litternally where they belongs and then later exported into CL)
<logicmoo> ok, so possibly, ABCL is the odd one here
fortitude has joined #lisp
hexfive has quit [Read error: Connection reset by peer]
<logicmoo> in my impl (i followed ABCLs method here) i ended up with CL::TEST as a non exported symbol and was wondering how wierd it was to have several non export symbols in COMMON-LISP
<Shinmera> 21:40:50 Shinmera | Who cares?
<Xach> There should be exactly 976 symbols in COMMON-LISP.
<Shinmera> the standard only says things about exported symbols, if I remember correctly
<Xach> Any more and things could really get fouled up.
hexfive has joined #lisp
<logicmoo> exacly i was thinking about the ANSI tests
<logicmoo> Shinmera.. please ignore me
<Shinmera> I refuse
drewc_ has joined #lisp
<Shinmera> clhs 11.1.2.1
<Shinmera> "The COMMON-LISP package can have additional internal symbols.
<Shinmera> "
<logicmoo> yet everyone works very hard not to
<Shinmera> I don't think they do, there's just no reason to.
* phoe grabs the STANDARD-COMPLIANT stamp
<Shinmera> You shouldn't (in-package :cl) anyway, so there's no reason other symbols might end up in there anyway.
attila_lendvai42 has joined #lisp
drewc has quit [Ping timeout: 268 seconds]
<logicmoo> yeah i think i am going to stop doing that
<phoe> interning symbols in CL package is undefined behaviour
<Shinmera> phoe: Remember he's writing an implementation
* phoe facepalms
<logicmoo> ABCL does it via (in-package :cl) (so was i)
<phoe> in this case, interning symbols in CL package is undefined behaviour, BUT you're in a good place to define it
fortitude_ has joined #lisp
<Shinmera> logicmoo: I'd just define the functions in your implementation package and then (export (import foo :cl) :cl). Maybe even make a macro that does that automatically.
<logicmoo> mainly my concern was code that for whatever reason my call (find-symbol "..." :CL)
<logicmoo> my/might
<d4ryus> to clarify: sb-bsd-sockets:socket-receive with :dontwait t only reads all available bytes without blocking. Which means one could use usocket:wait-for-input to check which sockets have input available and then read from those all available bytes without blocking. This can be used to read from multiple sockets from a single thread.
<logicmoo> Shinmera: yup i have seen a few macros that do that in various places
fortitude has quit [Ping timeout: 252 seconds]
eivarv has quit [Quit: Sleep]
Jen has quit [Remote host closed the connection]
hexfive has quit [Remote host closed the connection]
Jen has joined #lisp
bgardner has joined #lisp
<Xach> I would make a defpackage with all 976 symbols exported, and then only reference them as cl:whatever thereafter.
<Xach> d4ryus: there ya go
nowhereman_ has joined #lisp
xaotuk has joined #lisp
Ven`` has joined #lisp
nowhere_man has quit [Ping timeout: 268 seconds]
hexfive has joined #lisp
<borei> does lisp generate generic function for macroses ? in other words can i create 2 macroses with the same name but different signature ?
<dlowe> borei: you can with &rest parameters
<dlowe> borei: it will be the same macro but you will have to decide its behavior depending on its arguments.
frodef has quit [Ping timeout: 248 seconds]
<cgay> sbcl CREDITS hasn't been updated for 5 years, so supplement it with the github commit history I think.
<borei> oh, forgot about that key.
<borei> tks !
<dlowe> np
<cgay> aaaaand I forgot I was reading scrollback again.
<dlowe> still a little relevant :)
<cgay> dammit. I mostly try not to be relevant.
<bms_> :P
quazimodo has joined #lisp
gtuser has quit [Quit: gtuser]
attila_lendvai42 has quit [Ping timeout: 265 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<aeth> Don't forget that macros use a more advanced lambda list than functions. (defmacro foo (((&key bar) &key foo) &body body) `'(,foo ,bar ,@body)) (foo ((:bar 0) :foo 42) 1)
red-dot has joined #lisp
<aeth> (&optional and &rest can be used instead of &key in that example, if you also change the way the macro's called)
scymtym has joined #lisp
<aeth> The best part about this is that if you can do it entirely through the lambda-list, Emacs+SLIME will know the full API and tell you in the mini-buffer.
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
tomaw has quit [Read error: Connection reset by peer]
tomaw has joined #lisp
attila_lendvai42 has joined #lisp
grumble has quit [Killed (Sigyn (BANG!))]
grumble has joined #lisp
nowhereman_ has quit [Ping timeout: 256 seconds]
sz0_ has joined #lisp
<logicmoo> Xach: thank you
nowhereman_ has joined #lisp
josemanuel has quit [Quit: leaving]
<jmercouris> Is there a way to embed an opengl view within mcclim?
<Shinmera> Things work the other way around.
bms_ has quit [Quit: Leaving]
<Shinmera> You'd embed mcclim in an opengl window.
<jmercouris> I see
<Shinmera> And then you could draw opengl stuff to a subregion of that.
<jmercouris> hmm, sounds complicated
<Shinmera> Anyway, point is, if you want to draw with GL you need a GL context and a GL window from the OS.
<Shinmera> You could potentially do stuff like creating an offscreen context, rendering to that, extracting the texture, and then drawing that onto a native surface or whatever
<Shinmera> But typically you want things to go the other way around
hexfive has quit [Read error: Connection reset by peer]
<aeth> Generally, people use SDL via cl-sdl2 to get the GL context and GL window and handle input. This is extreme overkill because you're bundling a large C library with tons of platform support you'll never use and tons of features you'll never use, via a large wrapper with additional features you won't use, just to get OpenGL up.
<aeth> But I do this because doing things the right way would probably be harder. Doing things the lazy way probably makes distribution harder, though.
<Shinmera> GLFW is more minimal and works just as well
<Shinmera> There's also the lisp native GLOP, but it's pretty broken
hexfive has joined #lisp
junxit has quit [Remote host closed the connection]
<aeth> Fortunately, I only need to support X and Windows because Apple decided to not update OpenGL in the last 6.5 years or so.
<aeth> So I could do an approach similar to GLOP if only I had the time.
<Shinmera> Huh? GL3+ works just fine on mac.
<aeth> 4.1
<aeth> Mac stops at 4.1
Guest54593 has quit [Remote host closed the connection]
<aeth> OpenGL 4.2 was released 2011-08-08
hexfive has quit [Client Quit]
<Shinmera> Well, most things can be done with 4.1
sjl has quit [Ping timeout: 248 seconds]
<aeth> I don't have the resources to maintain two renderers, a fast one for modern OpenGL and a slow one for OS X.
<aeth> I also don't have the resources to overpay for hardware and get a Mac Mini just to test on OS X.
<phoe> aeth: hackintoshes are doable nowadays
<phoe> but that's a completely #lispcafe topic
<Shinmera> aeth: What exactly do you need to do that requires such a recent GL?
<aeth> Shinmera: I currently use 3.3 and I am bumping up the API as I need the features, but I am not supporting OS X with my engine because I'm not going to limit my features at 4.1.
<aeth> e.g. 4.3 introduces compute shaders
<Shinmera> Well, you're cutting out a large user base then.
<aeth> Anyone will be free to add #+darwin and #-darwin via patches to my engine if they want to. I just don't have the resources to do so myself.
<aeth> It wouldn't just be the renderer, though, e.g. Windows and standard Unix configuration/local-data directories (e.g. ~/.config/ and ~/.local/share/) are supported for "free" through UIOP
<aeth> macOS directories would have to be handled manually
igemnace has quit [Quit: WeeChat 2.0.1]
<aeth> (UIOP treats macOS as a Unix)
fikka has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shifty has joined #lisp
xaotuk has quit [Ping timeout: 265 seconds]
SuperJen has joined #lisp
attila_lendvai42 has quit [Ping timeout: 265 seconds]
angavrilov has quit [Remote host closed the connection]
wigust_ has quit [Quit: ZNC 1.6.5 - http://znc.in]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<phoe> (as it should be)
fortitude_ has quit [Ping timeout: 265 seconds]
red-dot has joined #lisp
vlatkoB_ has quit [Remote host closed the connection]
Jen has quit [Ping timeout: 248 seconds]
wigust has joined #lisp
logicmoo is now known as dmiles
* p_l has trouble considering macOS to be "large user base" still :|
quazimodo has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
<Shinmera> it's significant enough for developers
pilfink has joined #lisp
<Shinmera> As in, lots of developers use macs
<aeth> For games, there's the Steam HW survey. Unfortunately, the Steam HW Survey is no longer accurate due to the massive surge of accounts from China for PUBG. It's unlikely that those accounts are going to buy most games, especially ones without Chinese localizations.
wxie has joined #lisp
<aeth> I don't think the Steam HW survey has a region breakdown.
attila_lendvai42 has joined #lisp
<aeth> e.g. right now Linux is at 0.26%, way down from last year, but in the US, it's closer to 2.5% or so iirc.
<aeth> OSX is at 1.42%, but in the US it's probably closer to 8% or so
<aeth> if not 10%
<Shinmera> It also doesn't report GL version availability
<Shinmera> It lists most cards used, but you'd have to crunch the numbers manually and that's a pita
<aeth> And that wouldn't take into account OSes.
<aeth> macOS ships perfectly capable hardware, limited by drivers to 4.1
<aeth> And Intel's versions differ depending on platform because they have separate driver teams for Windows and Linux.
<jmercouris> I wonder why they do that
<jmercouris> what is their reasoning
<Shinmera> Writing drivers is hard
<jmercouris> I don
<jmercouris> I don't think that's their reasoning
<aeth> jmercouris: Android runs GL, iOS runs GL. (Technically the embedded version.) Only iOS and macOS run Metal. Mobile lock-in is the reason.
<aeth> They'll take worse games on Macbooks to provide more exclusive games to iOS, where they get a cut on every sale.
<jmercouris> You think so?
<jmercouris> I don't know that seems really far fetched to me
<jmercouris> what about other applications like final cut, and photoshop
<aeth> Applications that use GL tend to lag behind.
<aeth> It's the games that want the newer APIs
<jmercouris> This is too tinfoil hat
<jmercouris> especially since there is also a mac app store
<aeth> How much does Apple make on games on macOS? They don't get any from the ones sold through Steam.
<jmercouris> so why would they not want to sell games on the mac app store as well?
<jmercouris> I think a typical mac user will install from the app store before installing steam client + some games
<Shinmera> Anyway, this is getting pretty far from Lisp, so please >>#lispcafe
<aeth> jmercouris: I think most people who game on Apple hardware probably use Bootcamp to game through Windows because Windows has much better support for games.
<jmercouris> yeah, or wineskin
Karl_Dscc has quit [Remote host closed the connection]
openthesky has joined #lisp
resttime has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
damke has joined #lisp
dddddd has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 264 seconds]
<rumbler31> aeth: there exists a no-lib-necessary way to get an opengl i just need to find it
<Shinmera> rumbler31: I already mentioned it. It's called GLOP and it's broken.
<aeth> rumbler31: You essentially need to CFFI directly to X (or perhaps a clx-style approach would work), WinAPI, macOS's API, etc.
<aeth> That's what GLOP does (poorly)
varjag has quit [Ping timeout: 276 seconds]
<aeth> And, yeah, then if you solve sound, too, you have a 0-library approach, even though you do have to FFI to the OS and to OpenGL.
<Shinmera> Sound is solved
<aeth> s/0-library/0-foreign-library/
wxie has quit [Quit: Bye.]
<aeth> Shinmera: Is the sound library non-consing? The main reason (other than no libraries) that I'd want to replace cl-sdl2 is because it is the only thing in my game loop that conses, and a direct FFI approach could (hopefully) preallocate everything.
resttime has quit [Read error: Connection reset by peer]
<Shinmera> Should be mostly non-consing, though I have not tested for it.
<Shinmera> Non-consing isn't very important to me, but nativeness is.
<aeth> yeah, I get mostly non-consing through cl-sdl2
<aeth> I get absolutely non-consing in everything else, at least in SBCL
<aeth> Not even stack allocating, except for a few matrices that would be a pain to deal with in non-allocating ways.
<aeth> Ideally, the GC could be disabled during gameplay (can this be done in SBCL?) and only turned on outside of gameplay when consing could potentially happen. Although I'm not sure the GC would do much if all that's there are a bunch of long-lasting preallocated data structures that don't change.
<Shinmera> Avoiding GC at all cost kinda throws a lot of what makes CL advantageous out of the window in my opinion
quazimodo has quit [Ping timeout: 248 seconds]
<aeth> What makes CL adventageous is real macros and controlling when evaluation happens. The macros would be painful to write without GC, but the GC is happening outside of the game loop so it doesn't matter.
<aeth> I have two styles: inside game loop and outside game loop. Only the former cares about avoiding consing.
LiamH has quit [Quit: Leaving.]
<aeth> I should probably update my CONTRIBUTING.md to explain this, although it's not like anyone contributes.
quazimodo has joined #lisp
<rumbler31> ah glop is broken you say?
<Shinmera> It is.
<jasom> aeth: sbcl does support disabling the GC, but it will explode if a GC is ever needed
<Shinmera> rumbler31: if I remember correctly doesn't work at all on OS X, has a broken, unmovable, borderless, fixed-size window on Windows.
<rumbler31> huh
<rumbler31> thanks for the heads up
<Shinmera> jasom: if I remember correctly the GC shouldn't trigger unless there's pressure anyway, right?
<rumbler31> has anyone looked into cribbing racket's ui toolkit?
mishoo_ has joined #lisp
mishoo__ has quit [Read error: Connection reset by peer]
Kaisyu has joined #lisp
markong has quit [Ping timeout: 265 seconds]
margeas has joined #lisp
markong has joined #lisp
rumbler31 has quit [Ping timeout: 276 seconds]
margeas has quit [Ping timeout: 260 seconds]
attila_lendvai42 has quit [Ping timeout: 260 seconds]
mishoo_ has quit [Ping timeout: 248 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<JuanDaugherty> cribbing is documenting or porting?
<Xach> JuanDaugherty: borrowing, taking inspiration from, copying
osune has quit [Read error: Connection reset by peer]
<JuanDaugherty> ah, that's what I meant by porting
<JuanDaugherty> (from scheme to cl)
<JuanDaugherty> do have deja vu about the usage now
jameser has joined #lisp
<JuanDaugherty> the sense of inspiration, clonal activity vs regular port
fikka has quit [Ping timeout: 265 seconds]
Tristam has quit [Read error: Connection timed out]
moei has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
margeas has joined #lisp
fikka has joined #lisp
markong has quit [Ping timeout: 256 seconds]
smasta has quit [Ping timeout: 260 seconds]
xrash has joined #lisp
attila_lendvai42 has joined #lisp
milanj_ has quit [Read error: Connection reset by peer]
phadthai has quit [Ping timeout: 256 seconds]
phadthai has joined #lisp
mhd has joined #lisp
nightfly has joined #lisp
otwieracz has quit [Remote host closed the connection]
antoszka has quit [Quit: WeeChat 1.9.1]
mrSpec has quit [Quit: ZNC - http://znc.in]
<gendl> Hi, is there something which works similar to mapcan, but collects the results into a string instead of a list? (where the lambda function would return a string).