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
<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.
<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.
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]
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
<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.
<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.
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]
<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.