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
mindthelion has quit [Ping timeout: 272 seconds]
<aeth> I love how they retconned <b> to be "Bring attention to" instead of "Bold"
mindthelion has joined #lisp
techquila has quit [Ping timeout: 258 seconds]
t58 has quit [Quit: Night]
alexanderbarbosa has joined #lisp
libertyprime has joined #lisp
hiroaki has quit [Ping timeout: 244 seconds]
saravia has quit [Remote host closed the connection]
zigpaw has quit [Remote host closed the connection]
zigpaw has joined #lisp
arduo has quit [Remote host closed the connection]
nowhereman has joined #lisp
oudeis has quit [Ping timeout: 272 seconds]
torbo has joined #lisp
oudeis has joined #lisp
ebrasca has quit [Remote host closed the connection]
<Oladon> heh
semz has quit [Ping timeout: 264 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
anewuser has joined #lisp
jgodbout has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
Harag has joined #lisp
oudeis has quit [Quit: This computer has gone to sleep]
alexanderbarbosa has quit [Read error: Connection reset by peer]
ravenous_ has joined #lisp
chipolux has quit [Ping timeout: 264 seconds]
chipolux has joined #lisp
ravenous_ has quit [Ping timeout: 250 seconds]
lalilulelo has joined #lisp
_whitelogger has joined #lisp
renzhi has quit [Ping timeout: 272 seconds]
EvW1 has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Remote host closed the connection]
techquila has joined #lisp
Kundry_Wag has joined #lisp
mindthelion has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
phoe has quit [Ping timeout: 252 seconds]
Tordek has quit [Ping timeout: 258 seconds]
Tordek has joined #lisp
techquila has quit [Ping timeout: 264 seconds]
liberiga has joined #lisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
_whitelogger has joined #lisp
asupalai has joined #lisp
_whitelogger has joined #lisp
techquila has quit [Quit: Leaving]
Harag has quit [Ping timeout: 245 seconds]
danielvu has quit [Quit: WeeChat 2.5]
libertyprime has quit [Ping timeout: 248 seconds]
Bike has quit [Quit: Lost terminal]
danielvu has joined #lisp
pnp has joined #lisp
jgodbout has quit [Quit: Ping timeout (120 seconds)]
torbo has quit [Remote host closed the connection]
gravicappa has joined #lisp
jgodbout has joined #lisp
dddddd has quit [Remote host closed the connection]
liberiga has quit [Ping timeout: 260 seconds]
asupalai has quit [Remote host closed the connection]
asupalai has joined #lisp
<beach> Good morning everyone!
<jgodbout> Good morning!
<jgodbout> Technically it is the AM here
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
nowhereman has quit [Remote host closed the connection]
nowhereman has joined #lisp
<beach> jgodbout: Especially the last paragraph.
<jgodbout> Nicely referential
Harag has joined #lisp
pnp has quit [Ping timeout: 260 seconds]
Josh_2 has quit [Ping timeout: 248 seconds]
dkrm has quit [Ping timeout: 252 seconds]
vlatkoB has joined #lisp
mrtnpwn has joined #lisp
mrtnpwn has left #lisp [#lisp]
sonologico has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 248 seconds]
mep has joined #lisp
sauvin has joined #lisp
flamebeard has joined #lisp
Oladon has quit [Quit: Leaving.]
Wojciech_K has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
uplime has quit [Quit: ZNC 1.7.3 - https://znc.in]
uplime has joined #lisp
anewuser has quit [Ping timeout: 258 seconds]
nowhereman has quit [Read error: Connection reset by peer]
manualcrank has quit [Quit: WeeChat 1.9.1]
gioyik has joined #lisp
Harag has quit [Ping timeout: 244 seconds]
shka_ has joined #lisp
shrdlu68 has joined #lisp
Aruseus has joined #lisp
Mandus has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Mandus has joined #lisp
Patternmaster has left #lisp [#lisp]
<shrdlu68> Does Kennedy Mwenja hang out here?
JohnMS_WORK has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
nowhereman has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 258 seconds]
Harag has joined #lisp
nowhereman has quit [Read error: Connection reset by peer]
ravenous_ has joined #lisp
ravenous_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
jprajzne has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
Harag has quit [Ping timeout: 245 seconds]
igemnace has joined #lisp
Kundry_Wag has joined #lisp
vlatkoB_ has joined #lisp
frgo has quit [Ping timeout: 272 seconds]
Mandus has quit [Ping timeout: 245 seconds]
Mandus has joined #lisp
Harag has joined #lisp
vlatkoB has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 245 seconds]
varjag has joined #lisp
<shrdlu68> Oops, wrong channel.
gioyik has quit [Quit: WeeChat 2.5]
kajo has quit [Ping timeout: 264 seconds]
scymtym has quit [Ping timeout: 248 seconds]
ltriant has quit [Quit: leaving]
mep has quit []
Harag has quit [Remote host closed the connection]
Harag has joined #lisp
bendersteed has joined #lisp
scymtym has joined #lisp
a7f4 has joined #lisp
frgo has joined #lisp
xkapastel has joined #lisp
Harag has quit [Read error: Connection reset by peer]
Harag has joined #lisp
Aruseus has quit [Remote host closed the connection]
Harag has quit [Ping timeout: 245 seconds]
keep_learning has quit [Quit: Ping timeout (120 seconds)]
keep_learning has joined #lisp
hhdave has joined #lisp
heisig has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
makomo_ has joined #lisp
techquila has joined #lisp
Harag has joined #lisp
Lord_of_Life has quit [Ping timeout: 272 seconds]
Lord_of_Life has joined #lisp
JohnMS_WORK has quit [Read error: Connection reset by peer]
JohnMS_WORK has joined #lisp
zotan has quit [Ping timeout: 246 seconds]
zotan has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
oudeis has joined #lisp
oudeis has quit [Ping timeout: 272 seconds]
oudeis has joined #lisp
hiroaki has joined #lisp
amerlyq has joined #lisp
random-nick has joined #lisp
Lycurgus has joined #lisp
gareppa has joined #lisp
JohnMS has joined #lisp
gareppa has quit [Remote host closed the connection]
cosimone has joined #lisp
JohnMS_WORK has quit [Ping timeout: 244 seconds]
munksgaard[m] has joined #lisp
oudeis has quit [Ping timeout: 248 seconds]
oudeis has joined #lisp
ravenous_ has joined #lisp
ravenous_ has quit [Ping timeout: 244 seconds]
dddddd has joined #lisp
Harag has quit [Read error: Connection reset by peer]
xkapastel has quit [Quit: Connection closed for inactivity]
dddddd has quit [Ping timeout: 248 seconds]
gabbiel has joined #lisp
Kundry_Wag has joined #lisp
<gabbiel> what is the reason for needing funcall
dddddd has joined #lisp
<LdBeth> funcall accepts a symbol and find it’s global binding
<gabbiel> why can't the evaluator require either a symbol or a function as the first arg
<no-defun-allowed> FUNCALL may also take a function obtained through some other method and calls that, unlike the usual `(fn arg ...)` syntax.
<gabbiel> if its a symbol, just use the symbol-function of it, otherwise, apply the function
<no-defun-allowed> That is, `(fn arg ...)` is pretty close to `(funcall #'fn arg ...)`
<gabbiel> no-defun-allowed: so does my method, my method is better, I still don't see why funcall is needed at all
<LdBeth> That’s is, symbol-function cannot get dynamically fbound definition
<jackdaniel> gabbiel: imagine fn has no function associated with the symbol, so you evaluate it, and it evaluates to fn2
<jackdaniel> now imagine fn2 symbol has no function associated with it, so it is evaluated to fn
Kundry_Wag has quit [Ping timeout: 245 seconds]
<jackdaniel> we already know, that fn has no function associated with the symbol, so it evaluates to fn2
<jackdaniel> we already know, that fn2 has no function associated with the symbol, so it evaluates to fn
<jackdaniel> etc. another reason to always require function in function position is performance, application is much faster because you know the function at compilation time
<jackdaniel> while funcall requires runtime evaluation
<semz> isn't this basically just a restated lisp-1 vs. lisp-2
<jackdaniel> it is indeed
<jackdaniel> by application I mean "function application", not "application in other words a program"
<gabbiel> jackdaniel: that's a special case which the implementation could catch
Lycurgus has quit [Quit: Exeunt]
<jackdaniel> from what I have read MacLisp did allow that
<jackdaniel> otoh knowing that first atom is always a function makes code easier to read
<jackdaniel> imagine seeing code like this: (let ((foo (lambda (a) 42))) (foo 13))
<LdBeth> Otherwise it looks like a bst
<jackdaniel> you can't tell if foo will be called, you need to know if the symbol has function associated with it
<gabbiel> LdBeth: what do you mean symbol-function cannot retrieve the dynamiccaly bound function
<LdBeth> Function bind be flet/labels
<jackdaniel> it is a lexical binding, not dynamic
<gabbiel> I srot of understand now
<gabbiel> *sort
Harag has joined #lisp
<LdBeth> so it seems not possible a symbol fbound by flet/labels changes
<gabbiel> LdBeth: is that why sometimes I have to use #'symbol instead of 'symbol when using flet or labels?
cosimone has quit [Quit: Leaving]
<gabbiel> delete the sometimes, it seems to be the case everytime
<LdBeth> That probably could make inline local functions easier
igemnace has quit [Quit: WeeChat 2.5]
gareppa has joined #lisp
<gabbiel> oh yeah, can somebody explain inlining to me, somebody said I should inline this function
<gabbiel> (defun non-zero-integer-p (n)
<gabbiel> "Tests that n is an integer and not zero."
<gabbiel> (and (integerp n) (not (zerop n))))
igemnace has joined #lisp
<LdBeth> If a function is short or it is only defined for structuring program it worth to inline it
<ck_> do you mean explain the concept of inlining functions, or how to do it in common lisp?
<ck_> clhs inline
<gabbiel> the concept of it
<gabbiel> both actually
<ck_> do you know what a call stack is?
<gabbiel> yes
<ck_> inlining means not placing the function call onto that stack, but (at compile time) 'inlining' the function into the procedure that calls it
<no-defun-allowed> Basically, inlining substitutes the function body in where the function call goes.
<LdBeth> It’s principally the same as paste the code to the place you call it
<gabbiel> isn't that what macros do (body is replaced at compile time)
<no-defun-allowed> You lose some debugger information and the ability to update the function, but you avoid any function-calling overhead and possibly gain some more compiler optimisation, since it gets more context.
<LdBeth> Despite closure captured variables
<LdBeth> No, macro cannot handle self update code as inline function
<shrdlu68> gabbiel: Function calls have an overhead. Inlining functions eliminates that overhead.
<no-defun-allowed> You could implement some kind of inlining with macros, but it's quite silly and function inlining gives you your usual function-call semantics without any headaches.
<ck_> shrdlu68: pick up a big red block.
<no-defun-allowed> Like how in C you'd write #define max(x, y) ((x) > (y) ? (x) : (y)) and then max(x++,y) would go horridly wrong.
<no-defun-allowed> You could make a perfectly hygenic macro that does MAX correctly, but inlining is, again, less annoying, and you can use that function as an argument, too, eg (reduce #'max '(1 2 3 4 5))
<shrdlu68> ck_: My creator has not figured out AI alignment yet, so I refuse to do anything.
<LdBeth> Hygienic macro doesn’t solve once only problem
<ck_> shrdlu68: alignment as in lawful/evil/netral and so on? Ok, I understand. Thank you for replying.
<shrdlu68> ck_: Not quite, alignment as in https://www.youtube.com/watch?v=EUjc1WuyPT8
<no-defun-allowed> Fair enough, I just know CL's "do it yourself" macros and Scheme's "don't implement something more complex than substitution" safe macro system.
<gabbiel> ok i see how its different from a macro
<gabbiel> what do you mean you can't update it though
<LdBeth> Redefine it in a REPL
<ck_> shrdlu68: oh, thanks, I didn't know that term in this context yet.
<no-defun-allowed> If you evaluate another DEFUN form, or SETF FDEFINITION, that kind of thing, then where that function has been inlined won't get replaced with your new function.
<gabbiel> never understood hyegenic macros, doen't gensym make unique symbols anyways
<LdBeth> It’s just a fancier tools avoids write gensym everywhere
<no-defun-allowed> shrdlu68: please pick up a big red block, without hurting anyone, causing destruction to property, pissing off my cat, or booting Skynet
<LdBeth> GG
<gabbiel> unrelated, but im glad lisp will always be a thing
<no-defun-allowed> I wouldn't count on it, I probably forgot something and shrdlu68 will kill everyone indirectly because they really want that big red block.
<gabbiel> what is this big red block meme
<no-defun-allowed> SHRLDU is the meme: https://en.wikipedia.org/wiki/SHRDLU
lalilulelo has quit [Read error: Connection reset by peer]
<gabbiel> nice, never heard of that memelang
<gabbiel> *prog
<shrdlu68> no-defun-allowed: The odds of hurting someone, causing destruction to property, pissing off your cat, or booting skynet while picking up a big red block are non-zero.
<no-defun-allowed> shrdlu68: What if I said the big red block can't be a brick, won't be underneath any cats, shouldn't be obtained by dismantling houses, and that one can be obtained from my little brother's wooden blocks container?
ggole has joined #lisp
m00natic has joined #lisp
gabbiel has quit [Ping timeout: 258 seconds]
SaganMan has joined #lisp
Necktwi has quit [Ping timeout: 245 seconds]
ebzzry_ has quit [Ping timeout: 244 seconds]
Kundry_Wag has joined #lisp
ebzzry_ has joined #lisp
ebzzry_ has quit [Read error: Connection reset by peer]
ebzzry_ has joined #lisp
<gabot> pjb: Please? Huh?
<pjb> gabbiel is gone :-(
<pjb> Nobody told him about Kent's paper… :_(
Kundry_Wag has quit [Remote host closed the connection]
zulu-inuoe has joined #lisp
Bike has joined #lisp
flamebeard has quit []
makomo_ has quit [Ping timeout: 245 seconds]
makomo_ has joined #lisp
manualcrank has joined #lisp
cosimone has joined #lisp
mindCrime has joined #lisp
nanoz has joined #lisp
Kundry_Wag has joined #lisp
lucasb has joined #lisp
LiamH has joined #lisp
wxie has joined #lisp
asupalai has quit [Ping timeout: 258 seconds]
Wojciech_K has quit [Remote host closed the connection]
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
asupalai has joined #lisp
FreeBirdLjj has joined #lisp
asupalai has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
asupalai has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
pnp has joined #lisp
wxie has quit [Ping timeout: 264 seconds]
shrdlu68 has quit [Quit: WeeChat 2.3]
catchme has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
pnp has left #lisp [#lisp]
FreeBirdLjj has joined #lisp
Aruseus has joined #lisp
ebrasca has joined #lisp
dale__ has joined #lisp
dale__ is now known as dale
superkumasan has joined #lisp
dale has quit [Read error: Connection timed out]
dale has joined #lisp
makomo_ has quit [Ping timeout: 258 seconds]
orivej has quit [Ping timeout: 272 seconds]
makomo_ has joined #lisp
asupalai has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
heisig has quit [Quit: Leaving]
lemoinem has quit [Ping timeout: 246 seconds]
asupalai has joined #lisp
phadthai has quit [Ping timeout: 245 seconds]
fitzsim has quit [Ping timeout: 258 seconds]
saravia has joined #lisp
saravia has quit [Remote host closed the connection]
q9929t has joined #lisp
saravia has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
frgo has quit [Remote host closed the connection]
lemoinem has joined #lisp
frgo has joined #lisp
jprajzne has quit [Remote host closed the connection]
bendersteed has quit [Ping timeout: 258 seconds]
q9929t1 has joined #lisp
phadthai has joined #lisp
q9929t has quit [Ping timeout: 258 seconds]
q9929t1 is now known as q9929t
q9929t has quit [Client Quit]
sauvin has quit [Ping timeout: 244 seconds]
a7f4 has quit [Ping timeout: 248 seconds]
asupalai has quit []
sjl_ has joined #lisp
saravia has quit [Read error: Connection reset by peer]
saravia has joined #lisp
Kundry_Wag has joined #lisp
nanoz has quit [Ping timeout: 248 seconds]
xkapastel has joined #lisp
sauvin has joined #lisp
smazga has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
saravia has quit [Remote host closed the connection]
saravia has joined #lisp
bendersteed has joined #lisp
oudeis has quit [Quit: This computer has gone to sleep]
hiroaki has quit [Ping timeout: 258 seconds]
amerlyq has quit [Quit: amerlyq]
edgar-rft has quit [Quit: Leaving]
Harag has quit [Ping timeout: 248 seconds]
amerlyq has joined #lisp
frgo_ has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
frgo has quit [Ping timeout: 246 seconds]
cosimone has joined #lisp
vyorkin has joined #lisp
frgo_ has quit [Ping timeout: 258 seconds]
Aruseus has quit [Remote host closed the connection]
Oladon_work has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
<ebrasca> Hello
<Xach> ebrasca: hi
jgodbout has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
bpatrikm has joined #lisp
scymtym has joined #lisp
frgo has joined #lisp
FreeBirdLjj has joined #lisp
saravia has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
orivej has joined #lisp
Kundry_Wag has joined #lisp
makomo has joined #lisp
kajo has joined #lisp
makomo_ has quit [Read error: Connection reset by peer]
ober is now known as Billy21
gareppa has quit [Quit: Leaving]
gareppa has joined #lisp
Billy21 has left #lisp [#lisp]
gareppa has quit [Remote host closed the connection]
Ober has joined #lisp
paule32 has joined #lisp
<paule32> hello
<paule32> how can i calculate: 2^3 + 3^3 ?
<paule32> basis 2, exponent 3 + basis 3, exponent 3
<Oladon_work> paule32: How can you calculate 2^3?
<jackdaniel> (+ (expt 2 3) (expt 3 3)) ;?
koenig has joined #lisp
hhdave has quit [Quit: hhdave]
catchme has quit [Quit: Connection closed for inactivity]
nanoz has joined #lisp
<paule32> jackdaniel: thank you
<paule32> that is it
whartung has joined #lisp
notzmv has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #lisp
m00natic has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 245 seconds]
Lycurgus has joined #lisp
nanoz has quit [Read error: Connection timed out]
nanoz has joined #lisp
FreeBirdLjj has joined #lisp
Lycurgus has quit [Quit: Exeunt]
FreeBirdLjj has quit [Ping timeout: 272 seconds]
random-nick has quit [Ping timeout: 246 seconds]
random-nick has joined #lisp
oudeis has joined #lisp
<astronavt> "^" should be a valid function name right
dkrm has joined #lisp
<astronavt> does sbcl or any other implementation support unicode names? also would be curious if there is a library for "math mode" using infix notation for writing equations
<dlowe> astronavt yes and yes
Kundry_Wag has quit [Ping timeout: 248 seconds]
<pjb> astronavt: sure: (defun |"^"| (x) (list x x)) (|"^"| 42) #| --> (42 42) |#
ravenousmoose has joined #lisp
<astronavt> yeah but thats not easy to type :P
Kundry_Wag has joined #lisp
<astronavt> dlowe whats the name of the "math mode" library?
<pjb> You can write it as \"^\" if you prefer.
dmiles has quit [Read error: Connection reset by peer]
<astronavt> its been a while since i touched CL. need to go back and read up on stuff
dmiles has joined #lisp
gxt has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
<Xach> last i checked, last year, lispworks had a lot of trouble with unicode in symbols.
<pjb> astronavt: That said, I don't understand why you ask about unicode, since all the characters in (symbol-name '|"^"|) are in the ascii repertoire: (map 'list 'char-code (symbol-name '|"^"|)) #| --> (34 94 34) |#
<astronavt> pjb (let ((σ² (* σ σ))) ...)
<pjb> Yes, this should work in any implementation supporting unicode.
<astronavt> great
<pjb> (let* ((σ 0.7) (σ² (* σ σ))) (list σ σ²)) #| --> (0.7 0.48999998) |#
McParen has joined #lisp
<ebrasca> Do you have some recomendations for testing in common lisp?
bendersteed has quit [Remote host closed the connection]
<sjl_> I like 1am
<sjl_> super simple, works well
<dlowe> I like stefil
a7f4 has joined #lisp
<astronavt> 1am reminds me of pytest in python
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<astronavt> dlowe do you use fiasco or stefil?
vyorkin has quit [Read error: Connection reset by peer]
<dlowe> I've used stefil
<dlowe> 1am looks good too
<dlowe> though if multiple projects use 1am, it looks like it will run all of their tests
edgar-rft has joined #lisp
vyorkin has joined #lisp
<ebrasca> sjl_: 1am is interesting, thank you!
<ebrasca> dlowe: I think I have read stefil is abandoned.
<dlowe> oh, that's too bad
<dlowe> Guess I should switch my project over to fiasco
McParen has left #lisp [#lisp]
cosimone has quit [Quit: Leaving]
orivej has joined #lisp
ggole has quit [Quit: Leaving]
random-nick has quit [Ping timeout: 246 seconds]
cosimone has joined #lisp
nanoz has quit [Read error: Connection timed out]
nanoz has joined #lisp
Harag has joined #lisp
a7f4_ has joined #lisp
ravenousmoose has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
vyorkin has quit [Read error: Connection reset by peer]
makomo has quit [Quit: WeeChat 2.4]
vyorkin has joined #lisp
smazga has quit [Ping timeout: 245 seconds]
cosimone has quit [Quit: Leaving]
random-nick has joined #lisp
Juzzika has joined #lisp
<ebrasca> How do you start testing?
stepnem has quit [Ping timeout: 244 seconds]
stepnem_ has joined #lisp
<dlowe> when you write a function do you test it in the repl?
<dlowe> put the same stuff in a function
<dlowe> you will quickly grow to hate global state
<ebrasca> dlowe: What do you mean?
<dlowe> everything that isn't a parameter will have to be set up in your tests to avoid interfering with your other tests
<dlowe> which makes there be a real and persistent cost to everything you have to set up
amerlyq has quit [Quit: amerlyq]
<dlowe> the easiest kind of testing is you call a function with some arguments and you compare against the return values
Juzzika has quit [Ping timeout: 258 seconds]
<ebrasca> dlowe: For example if I am testing my implementation of fat32, how to test it?
<shka_> dlowe: nothing new
<shka_> ebrasca: mock parts of the implementation?
<Oladon_work> ebrasca: What is it supposed to do?
* ebrasca is searching what "mock" is.
<Oladon_work> Check whether it does that.
<dlowe> ebrasca: I would set up an in-ram virtual disk and see if reads and writes to it behave like you would expect
<ebrasca> dlowe: Do you mean some big array?
<dlowe> ebrasca: there's a difference between a mock and a fake now, where a fake is something you construct to behave like an external dependency, and a mock is a thing that a library constructs for you
<dlowe> ebrasca: whatever thing your fat32 implementation runs on
<ebrasca> dlowe: It is for Mezzano OS.
<dlowe> if you use syscalls, that may mean abstracting out the syscalls so they may be swapped out during testing
<ebrasca> dlowe: It support fat12 , fat16 and fat32.
<shka_> dlowe: exactly
smazga has joined #lisp
<dlowe> ebrasca: does mezzano have the capability to mount RAM-backed storage? Because that would be the easiest, it seems to me
<ebrasca> dlowe: How much data?
<dlowe> but each function in your driver could also be tested (this is unit testing)
<dlowe> ebrasca: how much is required?
<ebrasca> dlowe: Don't know. Maybe 256MiB ?
trafaret1 has joined #lisp
<trafaret1> hi there
<trafaret1> what is lexical-let?
<trafaret1> can anybody explain shortly
oudeis has quit [Quit: This computer has gone to sleep]
__jrjsmrtn__ has quit [Ping timeout: 248 seconds]
_jrjsmrtn has joined #lisp
<dlowe> trafaret1: it's in #emacs
<dlowe> ebrasca: I don't know what you're asking.
gabbiel has joined #lisp
akoana has joined #lisp
<ebrasca> dlowe: I am thinking it is very hard to think in testing.
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
nanoz has quit [Ping timeout: 258 seconds]
<dlowe> ebrasca: if you called a function, how would you know it is broken?
<dlowe> what are *all* the ways you could know it was broken
X-Scale has quit [Read error: Connection reset by peer]
<ebrasca> dlowe: Do I need to test all functions? what about methods?
<dlowe> ebrasca: it's just regular programming
Aruseus has joined #lisp
Kundry_W_ has joined #lisp
<dlowe> Just start by calling some top level functions and seeing if they work
<ebrasca> dlowe: But it is not automatic testing.
Kundry_Wag has quit [Ping timeout: 244 seconds]
<dlowe> ebrasca: it is if you write code to do exactly that
<Ober> trafaret1: lexical-let is the newest generation of excellence in lisp. No other lisp has it because we're too old school
* ebrasca don't undestand.
<Harag> :dlowe ..with testing global state can also be your friend, if you design your tests to use global state you set up "scenarios" and then swap them out with out comping up with values having to change the actual tests, all your tests does is check the output then.
<dlowe> ebrasca: (defun test-write-file () (fat32-write +test-data+) (check-to-see-if-write-happened))
Lycurgus has joined #lisp
gabbiel has quit [Read error: Connection reset by peer]
oudeis has joined #lisp
gabbiel has joined #lisp
Aruseus has quit [Remote host closed the connection]
Aruseus has joined #lisp
gabbiel has quit [Read error: Connection reset by peer]
vyorkin has quit [Remote host closed the connection]
gabbiel has joined #lisp
<gabbiel> going back to the inlining discussion, is it best to inline as much as possible?
vyorkin has joined #lisp
Blukunfando has joined #lisp
<ebrasca> gabbiel: If you inline to much you can have bad results.
<gabbiel> I thought inlining deleted overhead
<gabbiel> so if you inline verything, there wont be overhead
<gabbiel> idk how inlininig works for recursive functions though
<gabbiel> since somebody said its basically text substitution
<gabbiel> maybe recursive functions shouldn't be inlined
<ebrasca> gabbiel: Have in mind there is space limits vs time limit.
Lycurgus has left #lisp ["Deus Ex"]
<dlowe> space is pretty cheap these days for most things
Ven`` has joined #lisp
vlatkoB_ has quit [Remote host closed the connection]
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
iovec has joined #lisp
shka_ has quit [Ping timeout: 245 seconds]
gravicappa has quit [Ping timeout: 268 seconds]
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
<White_Flame> gabbiel: inlining can work against interactive programming. If you redefine a function that's inlined somewhere else, it's best to restart your image and reload
jxy has quit [Quit: leaving]
<White_Flame> you might get some compiler overflow errors if you explicitly declare a recursive function to be inline. But with tail call optimization, self-recursion can reduce down to a single jump so the point is moot
<White_Flame> and the "space" tuning today is often about cache hits vs misses
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
gabbiel has quit [Remote host closed the connection]
gabbiel has joined #lisp
cosimone has joined #lisp
oudeis has quit [Ping timeout: 272 seconds]
shka_ has joined #lisp
<ebrasca> White_Flame: Can you make it to auto recompile all functions using some inlining?
<White_Flame> well, you could certainly develop something like that by changing the implementation
vyorkin has quit [Ping timeout: 245 seconds]
Bike has quit [Remote host closed the connection]
<White_Flame> but a similar issue appears with macros as well. If you change the defmacro, that doesn't re-expand all its uses automatically, especially since macro expansions might perform side effects
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
permagreen has quit [Read error: Connection reset by peer]
Bike has joined #lisp
<ebrasca> White_Flame: Now I undestand why sometimes my code work strange.
gabbiel has quit [Read error: Connection reset by peer]
gabbiel has joined #lisp
Ven`` has joined #lisp
oudeis has joined #lisp
a7f4 has quit [Ping timeout: 245 seconds]
tankf33der has left #lisp [#lisp]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
oudeis has quit [Quit: Leaving]
Lord_of_Life_ is now known as Lord_of_Life
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trafaret1 has quit [Remote host closed the connection]
jxy has joined #lisp
saravia has joined #lisp
Insanity_ has joined #lisp
ebrasca has quit [Ping timeout: 248 seconds]
ebrasca has joined #lisp
vivit has joined #lisp
<vivit> I'm having some problems with quicklisp. It can't seem to find any packages at all.
gabbiel has quit [Ping timeout: 245 seconds]
shka_ has quit [Ping timeout: 245 seconds]
<ebrasca> vivit: Can you paste some error you are geting?
saravia has quit [Remote host closed the connection]
<paule32> hello to the math profis:
vivit1 has joined #lisp
<paule32> given x = a^2 + b^2
vivit has quit [Ping timeout: 258 seconds]
saravia has joined #lisp
<vivit1> system-apropos lists nothing when I search for the names of packages that are right there on quickdocs, and when I try to quickload them I'm told that they're not found
<paule32> to goal is to find: a = 34, b = 65
saravia has quit [Remote host closed the connection]
mindCrime has quit [Ping timeout: 245 seconds]
<paule32> then x = 34 + 65
saravia has joined #lisp
<ebrasca> paule32: You need 2 ecuations and I think #math is better.
<paule32> hello ebrasca, it's more lisp
<paule32> calculate, yes, but string output and formating lisp
<paule32> haha. conclusion, a mix of these
<ebrasca> paule32: a^2 in lisp (expt a 2)
Aruseus has quit [Remote host closed the connection]
<ebrasca> paule32: You can manipulate it like list moving element or doing think to them.
<ebrasca> paule32: Do you ask for equation solver writen in common lisp?
<paule32> ebrasca: ok, thanks
<paule32> ebrasca: next, the goal problem/result
<vivit1> Where does quicklisp try to download from?
<paule32> ebrasca: the script have to find 2 fracts a/b, where the cube's result in a |N natural number
gabbiel has joined #lisp
gabbiel has left #lisp [#lisp]
vivit1 has quit [Quit: WeeChat 1.9.1]
<paule32> ehm sorry, Z number
<Oladon_work> paule32: You're essentially asking people to do your homework for you. I'm pretty sure that's not what whoever asked it of you had in mind.
<paule32> not my homework, but a thread in a newsgroup
<Oladon_work> Regardless -- you're asking people to write code for you. You're much more likely to get a good answer if you show that you're actually trying to write it yourself.
saravia has quit [Remote host closed the connection]
saravia_ has joined #lisp
<White_Flame> paule32: also, look up the term "CAS" (computer algebra system). there should be lisp libs available
<paule32> White_Flame: thanks
gioyik has joined #lisp
Bike has quit [Quit: Bike]
papachan has joined #lisp
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
Kundry_Wag has joined #lisp
Kundry_W_ has quit [Ping timeout: 272 seconds]
sjl_ has quit [Quit: WeeChat 2.3-dev]
wusticality has joined #lisp
xkapastel has joined #lisp
bendersteed has joined #lisp
LiamH has quit [Quit: Leaving.]
anewuser has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
fitzsim has joined #lisp
_whitelogger has joined #lisp
_whitelogger_ has joined #lisp
_whitelogger_ has joined #lisp
_whitelogger__ has joined #lisp
_whitelogger__ has joined #lisp
_whitelogger__ has joined #lisp
_whitelogger___ has joined #lisp
_whitelogger___ has joined #lisp
_whitelogger___ has joined #lisp
_whitelogger___ has joined #lisp
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger_ has quit [Remote host closed the connection]
_whitelogger has joined #lisp
_whitelogger has joined #lisp
ebrasca has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
bjorkintosh has quit [Ping timeout: 250 seconds]
<no-defun-allowed> (expt number 1/3)
<paule32> thanks
<ebrasca> paule32: I have rewrite your loop : http://ix.io/1SST/lisp
akoana has left #lisp ["Leaving"]
<aeth> On the earlier topic, inlining is an interesting alternative to type declarations. an inline 2+ (defun 2+ (x) (+ 2 x)) will avoid the generic + where possible just like the built-in 1+, but without needing to define 10 versions for each of the number types you might be using
<aeth> No need to worry about redefining something so trivial, either
<paule32> thank you ebrasca
<aeth> If you inline to remove generic sequence/number functions, then you also get smaller code, not larger.
<ebrasca> paule32: Do you come from programing in c?
<paule32> yes
wusticality has quit [Ping timeout: 246 seconds]
PuercoPop has quit [Ping timeout: 264 seconds]
<ebrasca> paule32: In common lisp you use +constant+ for constant and *variable* for variable.
<ebrasca> paule32: Global values.
<paule32> +const+ ?
<paule32> is new
<ebrasca> +name+
<paule32> is new for me
<ebrasca> paule32: Here link for more https://www.cliki.net/Naming+conventions
PuercoPop has joined #lisp
<paule32> how can i check if a number (rational or not) if a fraction
<no-defun-allowed> Anything (representable as a CL number) is a fraction if you have a large enough denominator.
<ebrasca> paule32: (typep object type-specifier) , for integer 2 it is (typep 2 'integer)
pjb has quit [Ping timeout: 252 seconds]
<ebrasca> paule32: I recomend you this http://clqr.boundp.org/clqr-a4-consec.pdf for Quick Reference.
<paule32> thx
beirc has joined #lisp