jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
zaquest has joined #lisp
makomo_ has quit [Ping timeout: 245 seconds]
<eigenhombre> I finally figured out my `cffl` problems; posted solution here: https://stackoverflow.com/a/57931463/611752. The problem seems to have been a bunch of outdated Homebrew packages.
lucasb has quit [Quit: Connection closed for inactivity]
<pjb> eigenhombre: that's one problem of cffi (and ffi in general): they use a static definition of foreign objects that is generally taken from C header sources (tripple whammy!).
<pjb> eigenhombre: at least, ccl tries to go thru ffigen to use a definition database, but ffigen is bitrotten, so it's not easy to generate new ffigen databases for random libraries.
<pjb> eigenhombre: in any case, the only «"'reasonable'"» approach would be to retrieve the foreign object definitions from the DWARF debug info, but it's not often available in any case.
<pjb> Just say No! to FFI.
* edgar-rft says hello to all dwarfs in this channel
madand has quit [Remote host closed the connection]
<eigenhombre> pjb: Thanks! I would prefer not to use FFI at all but want `curses` or equivalent... any other approaches I should look at?
jonatack has quit [Ping timeout: 246 seconds]
<Josh_2> aeth: what is the difference between a symbolic algorithm and a numeric one?
<no-defun-allowed> for integration, "symbolic" would be going from x^2 to x^3/3, "numeric" would be going from x^2 from 0 to 1 to 1/3, one works with numbers, and the other just symbols
<Josh_2> ah
<pjb> eigenhombre: eg. solving x^2+2x+1=0 numerically may give you -1.00001 and -0.999999 numerically and -1 and -1 (the integers) symbolically.
<Josh_2> right
<eigenhombre> 🙂
<pjb> sorry s/eigenhombre/Josh_2/
<no-defun-allowed> (if you had a better integral that converged, eg 1/x, you could integrate from -∞ to ∞)
<pjb> eigenhombre: using cl-charm thru FFI should be ok once you get it working. The difficulty here is the termcap or terminfo database, which is arcane. In this modern world, we could implement a terminfo database reader, and then use the control code obtained to issue them ourselves in a curses package written purely in lisp. It is difficult to do it conformingly because this requires binary I/O on the terminal, which is not defi
<pjb> the standard.
<pjb> eigenhombre: so there's no really good solution. A good solution would involve writing a CDR to specify binary I/O on unix tty and windows console terminals, and to use it to implement the above pure lisp curses.
<eigenhombre> pjb: Maybe a little more ambitious than my use case to start with, which is implementing a roguelike :-) But that's interesting, thank you!
<pjb> eigenhombre: this would also involve parsing and understanding the C curses code, in which I expect a lot of special cases and terminal specific heuristics to be encoded. Ie. the knowledge of how to use the terminfo database.
<pjb> eigenhombre: yes, but that's one problem: everybody wants to use ncurses for a little program, so nobody improves the lisp ecosystem.
<eigenhombre> Fair enough
<eigenhombre> It sounds though like it's not only a lisp ecosystem issue -- I know curses is like 40 years old or something....
<pjb> This is where you would need to win the lotto or sell a multi-hundred-millions startup, to finance such (usele$$) lisp developments.
<pjb> eigenhombre: The thing is that people still may use 50 years old terminals of various kinds.
<eigenhombre> Right, you mean for embedded / old consoles built into old infrastructure...?
<pjb> and run on linux CL programs that will have their *terminal-io* connected to such devices.
<pjb> eigenhombre: it's also not entirely geeky; some professionnal environment still use such old devices for various good-enough reasons.
Hsab_Selur has joined #lisp
<eigenhombre> Hah, I *had* one of those VT100 terminals on my desk in college
* eigenhombre dates himself
<pjb> OR, you can throw all that away, and design a new package for 2D textual interfaces. You might base it on emacs, or on some specific terminal emulator (but a lot of people would question you supporting a specific one such as Linux; perhaps using ECMA-048 would be ok, but not all terminal emulators support all the ECMA-048 features (hence back to terminfo)).
<pjb> anyways, nowadays most end-users will be behind a mobile web browser or a ms-windows box. So perhaps you only need to support that.
<pjb> see things like shell-in-a-box.
<pjb> Or just wait for AI singurlarity; this will solve all those problems for us once and for all.
noobineer has quit [Read error: Connection reset by peer]
khisanth_ has quit [Ping timeout: 245 seconds]
xkapastel has joined #lisp
shifty has joined #lisp
keep_learning has joined #lisp
asupalai has joined #lisp
kamog has quit [Quit: ERC (IRC client for Emacs 26.3)]
khisanth_ has joined #lisp
bitmapper has quit [Ping timeout: 240 seconds]
elfmacs has joined #lisp
elderK has joined #lisp
semz_ has quit [Ping timeout: 245 seconds]
asupalai has quit [Remote host closed the connection]
red-dot has joined #lisp
_paul0 has quit [Remote host closed the connection]
semz_ has joined #lisp
semz_ has joined #lisp
semz_ has quit [Changing host]
nullniverse has quit [Quit: Leaving]
nullniverse has joined #lisp
verisimilitude has joined #lisp
<verisimilitude> Look no further, eigenhombre: http://verisimilitudes.net/2018-04-04
<verisimilitude> Risking memory leaks shouldn't be necessary to control a terminal device.
t58 has quit [Quit: Leaving]
shifty has quit [Ping timeout: 265 seconds]
shifty has joined #lisp
Oladon has joined #lisp
<aeth> Josh_2: Symbolic math is roughly what you learned in school, with a handful of exceptions like Euler's method (if you learned that in school... or maybe quite a few more exceptions if you e.g. specifically took a numerical class in the math or comp sci department at a university).
ralt has quit [Quit: Connection closed for inactivity]
Oladon1 has quit [Ping timeout: 245 seconds]
<aeth> So e.g. symbolic integration is applying a big series of rules to attempt to reverse integration, including ones you'd learn in Calculus II and ones that are far too complicated for anyone but a computer to do.
<aeth> And numerical integration looks like this: https://en.wikipedia.org/wiki/Numerical_integration#Adaptive_algorithms
<aeth> As a rule of thumb, never write your own algorithms in this domain, just apply what you read on Wikipedia or in a book.
<emma> what are some reasons that we still enjoy lisp and would like to use it instead of some alternative
<verisimilitude> I like the machine independence, the ability to be lazy through metaprogramming, and how Lisp is particularly suited to programs that are vague in every way as they're being written.
<aeth> emma: My elevator pitch for Lisps is always syntactic representations of languages rather than using text-based templates. HTML is far from the only thing you can do this with (see: CSS, JS, SQL, GLSL, JSON, XML, CSV, etc.), but it's probably the simplest example.
<verisimilitude> That is, Lisp is good for exploratory programming.
<aeth> emma: In mainstream languages you'd use a template system like this to embed logic within .html files that then get processed textually to do your substitutions. <html> ... <body> <p> Hello, {{username}}! </p> </body> </html> might be what it looks like using something like https://mustache.github.io/
<aeth> emma: In a Lisp, you'd be more likely to do something like this: `(:html ... (:body (:p "Hello, " ,username "!"))) and generate the final HTML string at the end, after working on it structurally, perhaps in functions or perhaps in macros (or both!)
<aeth> So you get the full language, without the mess of having to embed it (and possibly escape certain characters) or using some DSL or something else.
karlosz has quit [Quit: karlosz]
<emma> hm, interesting. Thank you for your thoughts on that.
<aeth> And it's not much, I wrote something to generate HTML in a few days, with this test generation: https://gitlab.com/snippets/1892940#L83-115
<aeth> no parsing necessary
<aeth> I was thinking about how I'd do the same thing in C++ and it's not pretty. First, I'd have to make a gigantic enum of all of the tags instead of just using keywords that don't have to be aware of anything (with the exception of the HTML empty elements like br that turn into <br> or <br /> instead of <br></br>).
<aeth> And then I'd have to make a linked list where the head is one of those enums and the tail is either a string or another enum representing attributes (again, with me having to enumerate all of them instead of just using keywords). And visually, the end result would look pretty weird.
<aeth> And I wouldn't be able to trivially turn that into a syntactic macro. I can do that in CL since my function takes in a quoted s-expression as its main input.
maxxcan has joined #lisp
maxxcan has quit [Quit: maxxcan]
Codaraxis has joined #lisp
Josh_2 has quit [Remote host closed the connection]
ahungry has joined #lisp
<verisimilitude> An issue with Lisp is that it can be odd moving to a new language. I've been learning Ada for a while now and it's not always easy to plan a program out in the detail required, down to the types, and I'm inclined to believe being so accustomed to Common Lisp is part of the reason.
ahungry has quit [Remote host closed the connection]
Codaraxis has quit [Read error: Connection reset by peer]
<aeth> verisimilitude: give nearly everything its own type and if you change what its type is later on, you just change one line instead of many
<aeth> Might not work well in Ada specifically (see: the earlier conversation here)
karlosz has joined #lisp
<aeth> If foo is type Foo, then things are easy
<verisimilitude> Yes.
<aeth> Also, pick a domain that fits the language, if you're just learning it on your own. CL is much better than most languages at the sort of text generation that I was talking about earlier with my HTML example. But if you're doing something that is mostly double floats or something, then that solves most of the type issues in a static language.
<verisimilitude> In particular, I've strangled myself with the flexibility of Common Lisp for one program; it works in Common Lisp and I wanted to rewrite it in Ada, yet I find the idea lacks the structure necessary, so I'm going to need to rewrite the Common Lisp before I can get a good idea of how to write it in Ada.
<aeth> Oh, and generally, try to avoid linked lists and trees and graphs etc. in such languages. So much harder. Not sure about the details of Ada, though
<verisimilitude> Ada 2012 has standard doubly-linked lists, trees, sets, and other such things in its container library.
karlosz has quit [Client Quit]
<verisimilitude> Where one may use a hash-table in CL, one can usually use a simple array in Ada, though.
<red-dot> minion: registration, please?
<minion> The URL https://gitlab.common-lisp.net/users/sign_in?secret=d20b6b3c will be valid until 02:45 UTC.
<aeth> verisimilitude: Yes, but it's not GCed (by default) afaik, which makes such allocation-heavy stuff way harder imo.
<aeth> (Well, allocation-heavy in that sense, vs. an adjustable vector that just keeps allocating to the end but keeps it as one thing)
<verisimilitude> It can use GC, but it doesn't. There's not much dynamic allocation, actually, as most things can be allocated on the stack.
<verisimilitude> Another nicety of Ada are the pragmas which permit specifying certain things never occur along with banning implementation-specific functionality, etc.
saravia has joined #lisp
karlosz has joined #lisp
karlosz has quit [Client Quit]
karlosz has joined #lisp
raghavgururajan has joined #lisp
<aeth> verisimilitude: Have you ever tried (declare (dynamic-extent foo)) in CL? You can get surprisingly far in SBCL.
libertyprime has joined #lisp
<verisimilitude> I've written some macros that generate such declarations, but I don't tend to use it manually.
<verisimilitude> I should probably go through some of my programs and start adding declarations where they can't cause issues.
<beach> Good morning everyone!
<aeth> good morning beach
<sukaeto> aeth: the thing about HTML templating engines is that they're not designed for programmers, they're designed for UX/design people
<sukaeto> SQL would probably be a better example
<sukaeto> things like sxql are great
<sukaeto> so much better than e.g. sqlalchemy
<aeth> sukaeto: The thing about representing something like HTML in s-expressions is that once you get that initial representation that goes from a direct mapping to a string (with all of the relevant escaping) you can do whatever you want with it as prior steps in a process. For instance, I'm not going to write my HTML documents directly in the style of the Gitlab snippit I linked to earlier.
<aeth> I'm going to parse Markdown into s-expressions, and then transform them into those HTML s-expressions.
saravia has quit [Remote host closed the connection]
<aeth> sukaeto: You're allowed a level of polish in tooling that most people (even most people in the CL community) never get to. CL is really a language for writing declarative languages (which is also probably why SQL-in-s-expressions doesn't really seem like it needs many more layers)
xkapastel has quit [Quit: Connection closed for inactivity]
saravia has joined #lisp
_whitelogger has joined #lisp
Harag has joined #lisp
madand has joined #lisp
gravicappa has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
elderK has quit [Quit: WeeChat 1.9]
red-dot has joined #lisp
nullniverse has quit [Ping timeout: 276 seconds]
Bike has quit [Quit: Lost terminal]
elfmacs has quit [Ping timeout: 245 seconds]
_whitelogger has joined #lisp
madand has quit [Ping timeout: 276 seconds]
sjl has joined #lisp
ahungry has joined #lisp
krid has quit [Ping timeout: 240 seconds]
dddddd has quit [Remote host closed the connection]
_whitelogger has joined #lisp
ahungry has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
saravia has quit [Remote host closed the connection]
<pjb> In lesser languages such as C or Ada, managing types is easy: just use pointers to structures for everything.
<pjb> Ie. basically, do OO programming :-)
sauvin has joined #lisp
vap1 has quit [Ping timeout: 246 seconds]
elderK has joined #lisp
retropikzel has joined #lisp
ggole has joined #lisp
abhixec has joined #lisp
<aeth> Well, C and C++ and similar languages add an extra level of complexity in API choice that you don't see in CL. Basically, pass by reference vs value. i.e. (at least C-style pass by value) your choice is a pointer vs. copying-everything.
<beach> What language does pass-by-reference?
<pjb> generally, it's optional. Pascal has it, with var parameters. Modula-2 with INOUT parameters, etc.
<aeth> beach: No, what I meant is that for every function you make, you have this mental overhead of whether or not to do foo or &foo and there's probably even a line in object size where it's more efficient to do one or the other, and it's a lot of thinking
<beach> Sure.
abhixec has quit [Ping timeout: 265 seconds]
<aeth> It gets pretty bad in C++ more than C because you want to do OOP like everyone else, so you're doing a lot of Foo *foo that you call with &foo (except when you don't) and that means that in a lot of places you're having to do (*foo)[whatever] or (*foo)(whatever) or whatever << (*foo) and it quickly turns into a mess
<aeth> At least compilers are pretty good at telling you (in the first of 200 lines, which you then have to scroll up to read) when you should have used foo instead of &foo to call the function that wants Foo *foo.
<aeth> It's definitely not easy to bolt OOP onto C.
vlatkoB has joined #lisp
<aeth> (I'm not sure about Ada and if it addresses this. I wouldn't be surprised if Pascal is similar.)
refpga has quit [Ping timeout: 276 seconds]
refpga has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
<beach> In metamodular.com/modular-c.pdf I recommend programming with pointers only and using something like the Boehm-Weiser automatic memory manager. Uniform reference semantics is the only sane way of programming.
<pjb> Exactly.
<aeth> I wonder if there's a way to get something like CL semantics... basically, pointers except when it fits in a machine word? I guess not that simple.
<pjb> aeth: it wouldn't be safe C. It's better to write pure C code, (C code that is defined by the standard).
<beach> That's not Common Lisp "semantics", that's a Common Lisp implementation trick.
<aeth> pjb: Wouldn't it be even better to compile a C ABI-compatible binary, but with much Lispier semantics where possible? Technically, only the interop would matter.
<aeth> (I guess some could argue that C++ is slowly heading in that direction.)
<pjb> aeth: libecl!
<aeth> pjb: I don't think that counts because of the runtime. So I guess this is necessarily off-topic except for the obvious choice of the compiler language
<aeth> pjb: If such a language existed, you could potentially rewrite ECL in it, though. Then ECL wouldn't need a C compiler, too, since it could just do ECL->this-hypothetical-language->ECL
<pjb> aeth: the point is that when you adopt a stereotyped programming style, you necessarily use a run-time.
elfmacs has joined #lisp
retropikzel has left #lisp ["Leaving"]
retropikzel has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
igemnace has quit [Ping timeout: 276 seconds]
count3rmeasure has joined #lisp
sameerynho has joined #lisp
retropikzel has left #lisp ["Leaving"]
ralt has joined #lisp
igemnace has joined #lisp
karlosz has quit [Quit: karlosz]
shka_ has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
georgie has joined #lisp
jprajzne has quit [Client Quit]
Wojciech_K has joined #lisp
jprajzne has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
rippa has joined #lisp
igemnace has quit [Ping timeout: 268 seconds]
raghavgururajan has quit [Remote host closed the connection]
igemnace has joined #lisp
<verisimilitude> With Ada, it's not defined whether copying or referencing occurs with in out parameters, sans some special cases such as limited objects.
<beach> The fact that SBCL no longer complains when there is a DEFMETHOD but no associated DEFGENERIC does not suit me at all. My worsening dyslexia results in numerous spelling errors that are not caught.
froggey has quit [Ping timeout: 246 seconds]
georgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
froggey has joined #lisp
<beach> I guess I could turn on the spell checker for the code as well.
elderK has quit [Quit: WeeChat 1.9]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
igemnace has quit [Ping timeout: 245 seconds]
_paul0 has joined #lisp
greaser|q has quit [Remote host closed the connection]
greaser|q has joined #lisp
<saturn2> beach: (shadow 'defmethod) (defmacro defmethod (name &rest rest) `(if (typep (symbol-function ',name) 'generic-function) (cl:defmethod ,name ,@rest) (error "~A is not a generic function" ',name)))
ravenousmoose has joined #lisp
<beach> saturn2: Yeah, I could do something like that.
<beach> Not that particular one, though.
shifty has quit [Ping timeout: 240 seconds]
igemnace has joined #lisp
asdf_asdf_asdf has joined #lisp
* Shinmera wonders if a general utility to check all symbols for a close Levenshtein distance would be useful
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
<pjb> Shinmera: it could.
<pjb> Here I have a tool to check for "duplicate" symbols, ie. symbols with the same name interned in different packages. https://github.com/informatimago/lisp/blob/master/tools/symbol.lisp#L133
<pjb> For when you make package definition errors.
<pjb> But checking for symbols with similar names in the same package would also be useful.
asdf_asdf_asdf has quit [Quit: Ping timeout (120 seconds)]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
vsync_ is now known as vsync
igemnace has quit [Ping timeout: 245 seconds]
asdf_asdf_asdf has joined #lisp
Android has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
igemnace has joined #lisp
refpga has joined #lisp
elderK has joined #lisp
sameerynho has quit [Quit: WeeChat 2.4]
Lord_of_Life has quit [Ping timeout: 264 seconds]
igemnace has quit [Ping timeout: 265 seconds]
<Android> flex on
igemnace has joined #lisp
ljavorsk has joined #lisp
refpga has quit [Read error: Connection reset by peer]
jonatack has joined #lisp
Lord_of_Life has joined #lisp
jprajzne has quit [Quit: jprajzne]
asdf_asdf_asdf has quit [Ping timeout: 268 seconds]
jprajzne has joined #lisp
georgie has joined #lisp
ravenousmoose has quit [Ping timeout: 276 seconds]
makomo_ has joined #lisp
jprajzne has quit [Client Quit]
Harag1 has joined #lisp
jprajzne has joined #lisp
ljavorsk has quit [Ping timeout: 265 seconds]
Harag has quit [Ping timeout: 276 seconds]
Harag1 is now known as Harag
francogrex has joined #lisp
<francogrex> hi
refpga has joined #lisp
georgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
refpga has quit [Ping timeout: 240 seconds]
akoana has left #lisp ["Leaving"]
cosimone has joined #lisp
refpga has joined #lisp
igemnace has quit [Ping timeout: 265 seconds]
asdf_asdf_asdf has joined #lisp
jonatack has quit [Ping timeout: 246 seconds]
gareppa has joined #lisp
jprajzne has quit [Read error: Connection reset by peer]
elderK has quit [Quit: WeeChat 1.9]
jprajzne has joined #lisp
shka_ has quit [Quit: Konversation terminated!]
francogrex has quit [Quit: Leaving.]
igemnace has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
ljavorsk has joined #lisp
Ricchi has quit [Remote host closed the connection]
igemnace has quit [Ping timeout: 240 seconds]
gareppa has quit [Quit: Leaving]
igemnace has joined #lisp
igemnace has quit [Client Quit]
jonatack has joined #lisp
nika has joined #lisp
elfmacs has quit [Ping timeout: 245 seconds]
asdf_asdf_asdf21 has joined #lisp
asdf_asdf_asdf has quit [Ping timeout: 276 seconds]
raghavgururajan has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
jonatack has quit [Quit: jonatack]
jonatack has joined #lisp
refpga has joined #lisp
asdf_asdf_asdf21 has quit [Remote host closed the connection]
asdf_asdf_asdf has joined #lisp
SaganMan has joined #lisp
refpga has quit [Ping timeout: 265 seconds]
dddddd has joined #lisp
ljavorsk has quit [Ping timeout: 276 seconds]
xkapastel has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
scymtym has quit [Ping timeout: 276 seconds]
jprajzne has quit [Quit: jprajzne]
count3rmeasure has quit [Quit: Leaving]
jprajzne has joined #lisp
maxxcan has joined #lisp
refpga has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
georgie has joined #lisp
gareppa has joined #lisp
raghavgururajan has quit [Remote host closed the connection]
Bike has joined #lisp
Inline__ has joined #lisp
aleamb has joined #lisp
Inline has quit [Ping timeout: 264 seconds]
cosimone has quit [Quit: Leaving]
varjag has joined #lisp
Inline__ has quit [Client Quit]
maxxcan has quit [Quit: maxxcan]
jprajzne has quit [Quit: jprajzne]
maxxcan has joined #lisp
jonatack has quit [Ping timeout: 265 seconds]
red-dot has joined #lisp
jprajzne has joined #lisp
maxxcan has quit [Remote host closed the connection]
<no-defun-allowed> Is there an implementation of A* pathfinding in Common Lisp?
<beach> Did you check in PAIP?
scymtym has joined #lisp
<Shinmera> no-defun-allowed: Shoulda watched my streams ;) https://github.com/Shinmera/flow/blob/master/graph.lisp#L131
<no-defun-allowed> Of course you did, and of course Norvig did too.
elfmacs has joined #lisp
<beach> no-defun-allowed: Page 209 in PAIP.
<no-defun-allowed> Thanks asdf_asdf_asdf, beach and Shinmera
<no-defun-allowed> Ah yeah, it'd be in PAIP. That's a good book.
varjag has quit [Ping timeout: 276 seconds]
cosimone has joined #lisp
longshi has joined #lisp
jonatack has joined #lisp
madand` has joined #lisp
akhetopnu has joined #lisp
shifty has joined #lisp
madand` has quit [Remote host closed the connection]
madand` has joined #lisp
madand` has quit [Remote host closed the connection]
Inline has joined #lisp
madand` has joined #lisp
jonatack has quit [Quit: jonatack]
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
jonatack has joined #lisp
random-nick has joined #lisp
wxie has joined #lisp
<SaganMan> no-defun-allowed: what's up with your nick? why no defun?
<jonatack> Just realised how good the logs are for this channel. Thank you to the kind people who maintain them!
<Shinmera> Thank god I hardly ever have to do anything
gareppa has quit [Quit: Leaving]
asdf_asdf_asdf has joined #lisp
krid has joined #lisp
lucasb has joined #lisp
wxie has quit [Remote host closed the connection]
SaganMan has quit [Quit: WeeChat 1.6]
madand` has quit [Ping timeout: 268 seconds]
retropikzel has joined #lisp
raghavgururajan has joined #lisp
nullniverse has joined #lisp
nullniverse has joined #lisp
vutral has quit [Ping timeout: 246 seconds]
varjag has joined #lisp
Harag has quit [Quit: Harag]
Harag has joined #lisp
Harag has quit [Client Quit]
rpg has joined #lisp
emacsomancer has joined #lisp
emacsomancer has quit [Client Quit]
emacsomancer has joined #lisp
orivej has joined #lisp
manualcrank has joined #lisp
raghavgururajan has quit [Remote host closed the connection]
georgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
longshi has quit [Quit: WeeChat 2.5]
gxt has quit [Remote host closed the connection]
bitmapper has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
analogue has joined #lisp
bbbobbb has joined #lisp
gxt has joined #lisp
bbbobbb has quit [Client Quit]
nowhere_man has quit [Ping timeout: 276 seconds]
mibr has joined #lisp
mibr has left #lisp [#lisp]
elfmacs has quit [Ping timeout: 265 seconds]
gareppa has joined #lisp
hiroaki has joined #lisp
Android is now known as bluelake
gareppa has quit [Quit: Leaving]
krid has quit [Ping timeout: 268 seconds]
<asdf_asdf_asdf> Hi. Which instruction is to get address from variable and change its value?
<asdf_asdf_asdf> https://cpy.pt/WE1EKdhF
<asdf_asdf_asdf> int = 5; void a(int &n) { n = 2; } std::cout<<i; // 5 a(i); std::cout<<i; // 2
<Bike> that's a reference, not a pointer
<Bike> none of that in ffi
<asdf_asdf_asdf> (SB-KERNEL::GET-LISP-OBJ-ADDRESS x)
<Bike> oh hell, don't do that
<Bike> i think you've been told this before, but if you insist on asking sbcl specific questions instead of using cffi, ask #sbcl. they'll probably tell you to use cffi and you should probably listen
<Bike> there's a well defined interface. you could have figured it out months ago
saravia has joined #lisp
<asdf_asdf_asdf> (set (sb-sys::int-sap (sb-kernel::get-lisp-obj-address x)) 15)
<asdf_asdf_asdf> How fix it?
<Shinmera> You don't.
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
saravia has quit [Ping timeout: 240 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
<asdf_asdf_asdf> Shinmera; OK. I search instruction, that it do.
<Bike> sbcl's garbage collector makes using the address of an object pretty fraught
<Bike> since it could be moved out from under you any time
<Bike> so, don't do that
<Bike> ffi is for foreign values, not lisp objects
<Bike> also, with fixnums, like in your attempt at a C++ analogy, it definitely won't work since they're just immediate and do not have addresses
jprajzne has quit [Client Quit]
<asdf_asdf_asdf> @Bike; OK. Then how change value variable inside function that will be changed outside function?
<Bike> You cannot pass a reference like you can in C++. You can only pass values as arguments.
<Bike> You can do things like (let ((x 2)) (print x) (funcall (lambda () (setf x 5))) (print x)), which will print 2 then 5.
<Bike> But there's no argument pasing.
saravia has joined #lisp
<Bike> Lisp just does not have references. You can pass objects and modify objects: (let ((x (cons 2))) (print (car x)) (funcall (lambda (c) (setf (car c) 5)) x) (print (car x)))
amerlyq has joined #lisp
<Bike> er, (cons 2 nil)
<Bike> But lisp has an entirely different model of things from C. Variables do not "have addresses".
<asdf_asdf_asdf> @Bike; Did it mean, that every time variables has different/other/another addresses?
<Bike> I don't understand your English.
<Bike> But conceptually, lisp variables do not have addresses.
<asdf_asdf_asdf> OK. Address of variable is changed every time compilation?
<Bike> No! There are no addresses!
<Bike> Variables do not have addresses.
<Bike> Listen to me.
<Bike> You cannot write C in Lisp. If you want to write C, write C.
<asdf_asdf_asdf> So, how is identified?
<Bike> Or C++ since you want references.
<Bike> Variables do not have a runtime presence, conceptually. They're just names.
makomo_ has quit [Quit: WeeChat 2.4]
<Bike> If you write something like (let ((x 2)) ...) for example, there's nothing stopping the compiler from simply storing 2 in a register, or perhaps using a different register for the same variable in different places, or maybe it will put it on the stack, or maybe it will eliminate the variable entirely and the value won't even exist in a register.
<asdf_asdf_asdf> I have understand, that variable is like to (gensym)?
<Bike> No.
<Bike> I don't even know what that means.
LiamH has joined #lisp
<Bike> I don't think you do either.
<asdf_asdf_asdf> Variable have likeness (gensym)?
<Bike> Stop.
cosimone has quit [Quit: Leaving]
<Bike> Read a book. Something. Learn to program. You have no conceptual background.
nullniverse has quit [Remote host closed the connection]
nullniverse has joined #lisp
nullniverse has joined #lisp
nullniverse has quit [Changing host]
<asdf_asdf_asdf> OK. So, why in SBCL are instruction such as get-lisp-obj-address, int-sap, etc?
Hsab_Selur has quit [Read error: Connection reset by peer]
<Shinmera> Bike: I think it would be best not to continue this conversation.
Aruseus has joined #lisp
jprajzne has joined #lisp
<asdf_asdf_asdf> OK. Thanks for answer. I maybe do other tasks.
cosimone has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
saravia_ has joined #lisp
bitmapper has quit [Read error: Connection reset by peer]
bitmapper has joined #lisp
saravia_ has quit [Remote host closed the connection]
<Bike> Shinmera: yes, my bad
saravia has quit [Ping timeout: 268 seconds]
bitmapper has quit [Client Quit]
nanoz has joined #lisp
bitmapper has joined #lisp
jprajzne has quit [Quit: jprajzne]
Lord_of_Life has quit [Ping timeout: 240 seconds]
jprajzne has joined #lisp
cosimone has quit [Quit: Quit.]
varjag has quit [Ping timeout: 245 seconds]
cosimone has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
bitmapper has quit [Remote host closed the connection]
bitmapper has joined #lisp
nanoz has quit [Quit: Leaving]
bitmapper has quit [Remote host closed the connection]
bitmapper has joined #lisp
jprajzne has quit [Quit: jprajzne]
bitmapper has quit []
gravicappa has quit [Ping timeout: 268 seconds]
gxt has quit [Quit: WeeChat 2.6]
cosimone has quit [Quit: Quit.]
bitmapper has joined #lisp
varjag has joined #lisp
stepnem_ is now known as stepnem
analogue has quit [Ping timeout: 240 seconds]
hiroaki has quit [Ping timeout: 265 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
adip has quit [Ping timeout: 245 seconds]
hiroaki has joined #lisp
jprajzne has joined #lisp
vap1 has joined #lisp
analogue has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
rpg has joined #lisp
adip has joined #lisp
rpg has quit [Client Quit]
PHREAQuency has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
red-dot has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
_whitelogger has joined #lisp
aleamb has quit [Ping timeout: 276 seconds]
malpas has joined #lisp
malpas is now known as aleamb
krid has joined #lisp
PHREAQuency has quit [Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/]
newbie84 has joined #lisp
akhetopnu has quit [Quit: Lost terminal]
Josh_2 has joined #lisp
rpg has joined #lisp
rpg has quit [Client Quit]
amerlyq has quit [Quit: amerlyq]
newbie84 has quit [Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/]
gxt has joined #lisp
gravicappa has joined #lisp
alexanderbarbosa has quit [Read error: No route to host]
dale has joined #lisp
jprajzne has quit [Quit: jprajzne]
emacsomancer has quit [Read error: Connection reset by peer]
jprajzne has joined #lisp
jprajzne has quit [Quit: jprajzne]
ap13 has joined #lisp
jprajzne has joined #lisp
<ap13> minion: registration, please?
<minion> The URL https://gitlab.common-lisp.net/users/sign_in?secret=69fe575d will be valid until 18:15 UTC.
cosimone has joined #lisp
<ap13> minion: registration, please?
<minion> The URL https://gitlab.common-lisp.net/users/sign_in?secret=69fe575d will be valid until 18:15 UTC.
<pjb> ap13: Yay! I know your secret! 69fe575d send me bitcoins, or else!
ap13 has left #lisp [#lisp]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
thesorton has joined #lisp
wigust has joined #lisp
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
cosimone has quit [Client Quit]
cosimone has joined #lisp
cosimone has quit [Client Quit]
cosimone has joined #lisp
cosimone has quit [Client Quit]
cosimone has joined #lisp
_paul0 has quit [Remote host closed the connection]
nullniverse has quit [Ping timeout: 276 seconds]
nika has quit []
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
nullniverse has joined #lisp
nullniverse has joined #lisp
nullniverse has quit [Changing host]
nanoz has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
bluelake has quit [Ping timeout: 276 seconds]
saravia has joined #lisp
vlatkoB has quit [Remote host closed the connection]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Lycurgus has joined #lisp
jprajzne has quit [Client Quit]
Lord_of_Life_ has joined #lisp
jprajzne has joined #lisp
Arcaelyx has joined #lisp
Lord_of_Life_ is now known as Lord_of_Life
madand` has joined #lisp
gravicappa has quit [Ping timeout: 265 seconds]
<asdf_asdf_asdf> Hi again. (describe (function sb-alien::define-alien-callback)). How it fix?
<asdf_asdf_asdf> The :macro name SB-ALIEN::DEFINE-ALIEN-CALLBACK was found as the argument to FUNCTION.
corvidzz has joined #lisp
adip has quit [Ping timeout: 265 seconds]
<verisimilitude> Based on the message you gave, you're giving an invalid argument to FUNCTION, it seems.
<verisimilitude> My suggestion, asdf_asdf_asdf, is to avoid writing C when one is ostensibly writing Common Lisp.
adip has joined #lisp
Wojciech_K has quit [Ping timeout: 240 seconds]
kpoeck has joined #lisp
<kpoeck> (describe 'sb-alien::define-alien-callback)
superkumasan has joined #lisp
hiroaki has quit [Ping timeout: 245 seconds]
Fare has joined #lisp
saravia has quit [Ping timeout: 245 seconds]
jprajzne has quit [Quit: jprajzne]
<asdf_asdf_asdf> Thanks all for help. Especially kpoeck, it works. Thanks. I thinked, that is a fuction not a symbol.
<kpoeck> as others said, you need to study the language more
jprajzne has joined #lisp
<kpoeck> http://www.gigamonkeys.com/book/ should be your friend
nowhere_man has joined #lisp
karlosz has joined #lisp
Ricchi has joined #lisp
saravia has joined #lisp
scymtym has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
libertyprime has quit [Quit: leaving]
nanoz has quit [Ping timeout: 245 seconds]
ggole has quit [Quit: Leaving]
karlosz has quit [Quit: karlosz]
retropikzel has quit [Remote host closed the connection]
nanoz has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<asdf_asdf_asdf> Hi again. Which function is to definition callback without body? https://cpy.pt/F8nzKM7a
<asdf_asdf_asdf> Lambda-list: (SB-ALIEN::NAME SB-ALIEN::RESULT-TYPE SB-ALIEN::TYPED-LAMBDA-LIST)
<asdf_asdf_asdf> I want it. Which function do?
cosimone has quit [Quit: Quit.]
<asdf_asdf_asdf> LRESULT CALLBACK WindowProc(HWND, UINT, WPARAM, LPARAM);
<asdf_asdf_asdf> Without body callback.
saravia has quit [Ping timeout: 246 seconds]
<asdf_asdf_asdf> SB-ALIEN::PARSE-CALLBACK-SPECIFICATION It's probably what I want.
cosimone has joined #lisp
madand` has quit [Remote host closed the connection]
nanoz has quit [Ping timeout: 240 seconds]
madand has joined #lisp
puchacz has joined #lisp
<puchacz> hi, does numcl work for anybody?
<puchacz> I tried (matmul ....) from the example and it failed
<puchacz> it is a bleeding edge I know
Arcaelyx has quit [Quit: Arcaelyx]
jprajzne has quit [Quit: jprajzne]
<asdf_asdf_asdf> @puchcz; what's argument You want?
<asdf_asdf_asdf> @puchacz*
jprajzne has joined #lisp
<puchacz> asdf_asdf_asdf: how about (matmul #2A((0.0 1.0) (2.0 3.0)) #2A((5.0 6.0) (7.0 8.0)))
<puchacz> I am getting this: https://pastebin.com/Pjk4aK2R
<asdf_asdf_asdf> What You have after (describe 'matmul)?
<puchacz> asdf_asdf_asdf: I got this: https://pastebin.com/yvAmKAP5
<asdf_asdf_asdf> Which error You get?
<puchacz> asdf_asdf_asdf: see above, my first paste: https://pastebin.com/Pjk4aK2R
<puchacz> have you got it installed?
<asdf_asdf_asdf> No, but You don't use matmul. Let's go on #lisp-pl.
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
krid has quit [Ping timeout: 245 seconds]
Lycurgus has quit [Quit: Exeunt]
Aruseus has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 268 seconds]
cosimone has quit [Quit: Quit.]
cosimone has joined #lisp
krid has joined #lisp
cosimone_ has joined #lisp
_atomik has joined #lisp
cosimone_ has quit [Client Quit]
_atomik has quit [Client Quit]
cosimone has quit [Client Quit]
_atomik has joined #lisp
cosimone has joined #lisp
corvidzz has quit [Quit: Lost terminal]
_atomik has quit [Quit: Leaving]
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
_atomik has joined #lisp
_atomik has quit [Remote host closed the connection]
_atomik has joined #lisp
_atomik has quit [Remote host closed the connection]
_atomik has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
rigidus has joined #lisp
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #lisp
rigidus has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
rigidus has joined #lisp
adam4567 has joined #lisp
rigidus has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
rigidus has joined #lisp
jprajzne has quit [Quit: jprajzne]
rigidus` has joined #lisp
rigidus` has quit [Remote host closed the connection]
jprajzne has joined #lisp
davd has joined #lisp
<davd> Hi there! Does someone know of some remote lisp job? :)
_atomik has quit [Quit: Leaving]
atomik_dog has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
LiamH has quit [Quit: Leaving.]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
ark has quit [Ping timeout: 264 seconds]
varjag has joined #lisp
<asdf_asdf_asdf> Hi. (sb-alien::define-alien-routine ...) How define a body of this routine?
<no-defun-allowed> You don't. That's to define an external C function.
<no-defun-allowed> And if you're going to use SBCL internals, #sbcl is probably more appropriate, else please use CFFI (and cffi:defcfun).
<asdf_asdf_asdf> OK, thanks. So I must use (defun from CL?
<no-defun-allowed> If you're going to make a Common Lisp function, always use DEFUN.
lucasb has quit [Quit: Connection closed for inactivity]
<no-defun-allowed> Now, could you do us a favour and learn Common Lisp before trying to get FFI working please?
<asdf_asdf_asdf> I prefer SBCL internals.
<no-defun-allowed> Then piss off.
<no-defun-allowed> That's all I have to say. Sorry, it's not very nice, but you are better served using C if you solely want to call C from SBCL.
<asdf_asdf_asdf> This is Your opinion.
<asdf_asdf_asdf> You can't force me to use FFI.
<no-defun-allowed> No, I can't, but I really think you should learn Lisp before trying to learn how to use any FFI.
davd has quit [Read error: Connection reset by peer]
<no-defun-allowed> Using unportable SBCL internals (which aren't even external to sb-alien!) is a bad idea too.
<asdf_asdf_asdf> I should learn Common Lisp and internals compiler e.g. SBCL.
<no-defun-allowed> You should learn Common Lisp and CFFI.
<asdf_asdf_asdf> No, because I want learn to assembly x86-64 and yourself write instructions for example to Common Lisp.
<no-defun-allowed> Then learn assembly and C and stop bothering us.
<asdf_asdf_asdf> You tell everyone, that to learn CFFI, but not everyone like it.
<no-defun-allowed> SB-ALIEN isn't portable, so it's not on topic for #lisp, and it's certainly not a good move for users of other implementations like Clozure CL.
cosimone has quit [Ping timeout: 245 seconds]
<asdf_asdf_asdf> OK. EOT.
nullniverse has quit [Ping timeout: 276 seconds]
<aeth> asdf_asdf_asdf: #sbcl for SBCL topics
<Bike> they tried sbcl on my suggestion already
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
akoana has joined #lisp
mathrick has quit [Ping timeout: 250 seconds]
abhixec has joined #lisp
jprajzne has quit [Quit: jprajzne]
abhixec has quit [Client Quit]
<rigidus> list
Fare has quit [Ping timeout: 276 seconds]
superkumasan has quit [Ping timeout: 265 seconds]
Josh_2 has quit [Ping timeout: 265 seconds]
mathrick has joined #lisp
jprajzne has joined #lisp
asdf_asdf_asdf has quit [Quit: asdf_asdf_asdf]
random-nick has quit [Ping timeout: 276 seconds]
Arcaelyx has joined #lisp
varjag has quit [Ping timeout: 265 seconds]
nanoz has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
jprajzne has quit [Client Quit]
rigidus has quit [Remote host closed the connection]
jprajzne has joined #lisp
mathrick has quit [Ping timeout: 245 seconds]
rigidus has joined #lisp
Fare has joined #lisp