<xsperry>
_death, interesting, thanks. I wonder how close we can take it syntax wise with macros
jack_rabbit has quit [Ping timeout: 272 seconds]
arbv has quit [Ping timeout: 260 seconds]
dale has quit [Quit: dale]
Kaisyu has joined #lisp
troydm has quit [Ping timeout: 276 seconds]
orivej has joined #lisp
Kundry_Wag has joined #lisp
troydm has joined #lisp
matzy_ has joined #lisp
<_death>
I guess something like this isn't too bad (take 10 (gen ((c (range 1)) (b (range 1 c)) (a (range 1 b))) (when (= (square c) (+ (square a) (square b))) (list a b c))))
arbv has joined #lisp
<xsperry>
what would range 1 return?
<_death>
a lazy list of integers from 1 to infinity
<xsperry>
I mean, is there already a list like that in some popular third party library
xsperry has quit [Quit: CGI:IRC]
<_death>
sure, there are many libraries for that.. series is one.. clazy, pipes, etc.
xsperry has joined #lisp
smokeink has joined #lisp
jack_rabbit has joined #lisp
captgector has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
Demosthenex has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Remote host closed the connection]
Demosthenex has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Alcinous has joined #lisp
<sabrac>
postmodern
shelvick has joined #lisp
meepdeew has quit [Remote host closed the connection]
Alcinous has quit [Quit: WeeChat 2.2]
Kundry_Wag has quit [Remote host closed the connection]
aindilis has quit [Remote host closed the connection]
mindCrime has joined #lisp
Kundry_Wag has joined #lisp
fikka has joined #lisp
aindilis has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 264 seconds]
Denommus has quit [Read error: Connection reset by peer]
meepdeew has joined #lisp
Kundry_Wag has joined #lisp
matzy_ has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
ski has quit [Ping timeout: 272 seconds]
jack_rabbit has quit [Ping timeout: 276 seconds]
ebzzry has quit [Quit: WeeChat 2.1]
Oladon has joined #lisp
dented42 has joined #lisp
Cymew has joined #lisp
jack_rabbit has joined #lisp
lumm has quit [Quit: lumm]
Cymew has quit [Ping timeout: 272 seconds]
ratxue has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
<LdBeth>
morning
notyou has joined #lisp
eschatologist has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 272 seconds]
orivej has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mathrick has joined #lisp
koenig1 has joined #lisp
XachX_ has joined #lisp
lonjil2 has joined #lisp
eschatologist has joined #lisp
Patzy_ has joined #lisp
cross_ has joined #lisp
pierpa has quit [Quit: Page closed]
bmansurov_ has joined #lisp
emaczen has quit [*.net *.split]
pjb has quit [*.net *.split]
LdBeth has quit [*.net *.split]
galdor has quit [*.net *.split]
XachX has quit [*.net *.split]
tfb has quit [*.net *.split]
lonjil has quit [*.net *.split]
Patzy has quit [*.net *.split]
koenig has quit [*.net *.split]
brandonz has quit [*.net *.split]
cross has quit [*.net *.split]
cyberlard has quit [*.net *.split]
jerme has quit [*.net *.split]
eMBee has quit [*.net *.split]
bmansurov has quit [*.net *.split]
XachX_ is now known as XachX
xsperry has quit [Ping timeout: 240 seconds]
ratxue has joined #lisp
brandonz has joined #lisp
dddddd has quit [Remote host closed the connection]
cyberlard has joined #lisp
atgreen has joined #lisp
mindCrime has quit [Ping timeout: 265 seconds]
marvin3 has quit [Remote host closed the connection]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
fikka has joined #lisp
igemnace has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
SaganMan has quit [Ping timeout: 264 seconds]
Alcinous has joined #lisp
SaganMan has joined #lisp
krwq has joined #lisp
Alcinous is now known as dura
<krwq>
how does slime figure out the arguments for macro/function? I tried to use function-lambda-expression but it seems it does something more clever
fikka has joined #lisp
<krwq>
I think I found: swank-backend:arglist
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
dented42 has joined #lisp
nsrahmad has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nsrahmad has quit [Remote host closed the connection]
nsrahmad has joined #lisp
notyou has quit [Quit: ERC (IRC client for Emacs 26.1)]
Kundry_Wag has joined #lisp
smokeink has quit [Ping timeout: 264 seconds]
nsrahmad has quit [Remote host closed the connection]
krator44 has left #lisp [#lisp]
Kundry_Wag has quit [Ping timeout: 256 seconds]
smokeink has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
slyrus has quit [Quit: slyrus]
slyrus2 is now known as slyrus
loli has quit [Ping timeout: 260 seconds]
groovy2shoes has quit [Ping timeout: 260 seconds]
koenig2 has joined #lisp
koenig1 has quit [Ping timeout: 264 seconds]
loli has joined #lisp
groovy2shoes has joined #lisp
dura is now known as Dura
krwq has left #lisp ["Killed buffer"]
vlatkoB has joined #lisp
Oladon has quit [Quit: Leaving.]
slyrus1 has joined #lisp
<sabrac>
Minion: memo for skidd0: See postmodern commit Aug 5 on deleting table with cascade
<minion>
Remembered. I'll tell skidd0 when he/she/it next speaks.
<earl-ducaine>
The code in question was written by Mlynarik (mly), who was working at Xerox at the time. So, it might have been a Interlisp convention.
steiner has joined #lisp
meepdeew has quit [Remote host closed the connection]
smokeink has quit [Ping timeout: 268 seconds]
SaganMan has quit [Ping timeout: 255 seconds]
steiner has quit [Ping timeout: 268 seconds]
steiner has joined #lisp
<aeth>
The two main styles are either p for single words and -p for multiple words or -p for everything. -p for everything does have its users
<aeth>
Then ? is probably distant third
<aeth>
The original style is foop and foo-bar-p. foo-p came later, either to make it unambiguous or because someone misunderstood the rules (probably both, depending on the person)
SaganMan has joined #lisp
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
lieven has joined #lisp
fikka has joined #lisp
nsrahmad has joined #lisp
<edgar-rft>
The question mark was used in the 1980s as the suffix for "unknown" variables in logical pattern matchers, while the p suffix was used for logical predicate functions. That was long before Scheme used ? for predicates.
<aeth>
I use the ? and ! conventions from Scheme from time to time. Interestingly enough, I don't use it in implementing my Scheme. If CL doesn't have a foop function and Scheme has a foo? procedure it seems clearest just to define a foop function and then use that as the implementation of Scheme's foo? procedure, especially when barp does exist in CL.
<aeth>
I'm fuly aware that if I use foo? somewhere, 90% of the readers will despise it, though :-p
<aeth>
foo! is trickier because there's no direct equivalent so it might be the best choice if you need to communicate mutation. The f in setf or incf doesn't mean the same thing.
fikka has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 252 seconds]
<aeth>
Any other Scheme naming convention will be unrecognizable by anyone.
<edgar-rft>
What I wanted to point out is that using ? for Common Lisp predicate functions is historically wrong.
<aeth>
The only wrong answer is some convention from another more distant language like is-foo (or get-foo)
nsrahmad has quit [Ping timeout: 264 seconds]
<edgar-rft>
there had been so many obscure conventions in the past that "wrong" becomes rather blurry in this context
<aeth>
It's funny that get-foo is, in my opinion, incorrect CL style that I wouldn't accept in any of my projects (just call it foo), but cl:get-TAB produces 9 results.
tralala has joined #lisp
<aeth>
Similarly, define-condition is there as a define-foo, even though the style many use is deffoo or defoo vs. define-foo-bar
<aeth>
I wouldn't consider define-foo wrong, though
nsrahmad has joined #lisp
<aeth>
The standard doesn't have +foo+ for its constants, just foo. That one's annoying. e.g. this won't work in SBCL: (let ((most-positive-fixnum 42)) (1+ most-positive-fixnum))
<aeth>
I wonder when +foo+ became the convention
<_death>
personally I stopped using +foo+ some years ago.. don't miss it
<aeth>
Instead of using +foo+ you can just take the convention from C and write it as FOO. e.g. (defconstant FOO 42)
SaganMan has quit [Ping timeout: 240 seconds]
<beach>
Good morning everyone!
smokeink has joined #lisp
<no-defun-allowed>
afternoon beach
<jackdaniel>
aeth: that C convention is broken for lisp, because default reader converts to upcase anyway
<jackdaniel>
and you still wouldn't be able to (let ((foo 3)) …)
<aeth>
jackdaniel: Yes
<jackdaniel>
I personally like the +convention+
<aeth>
jackdaniel: I was joking
<jackdaniel>
OK, apparently my sense of humour didn't wake up yet ;)
<aeth>
jackdaniel: +foo+ is superior anyway even if you could write FOO because not every Unicode character that's valid for a symbol name has an upper case form (although some symbols have upper case forms if you trust IRC)
<_death>
if it's a church numeral, you can use ✝foo✝
<no-defun-allowed>
💩foo💩 also works
<aeth>
+🍪+ is unambiguously a constant.
<aeth>
try to have a constant 🍪 in C
Kundry_Wag has joined #lisp
<aeth>
(defconstant +🍪+ 42)
<aeth>
And with the power of reader macros in CL you could even make it 🌘defconstant +🍪+ 42🌒
Kundry_Wag has quit [Ping timeout: 264 seconds]
<jackdaniel>
my eyes hurt
SaganMan has joined #lisp
heisig has joined #lisp
light2yellow has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
<schjetne>
beach: good morning! I'm back from holiday now.
Kundry_Wag has quit [Ping timeout: 252 seconds]
marvin2 has joined #lisp
galdor has joined #lisp
igemnace has joined #lisp
nsrahmad has quit [Ping timeout: 255 seconds]
SaganMan has quit [Ping timeout: 272 seconds]
schweers has joined #lisp
buffergn0me has joined #lisp
Dura has quit [Quit: WeeChat 2.2]
buffergn0me has quit [Ping timeout: 264 seconds]
angavrilov has joined #lisp
ratxue has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
mange has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
ratxue has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
azimut_ has joined #lisp
azimut has quit [Ping timeout: 272 seconds]
kajo has quit [Ping timeout: 276 seconds]
<beach>
schjetne: Great! Remind me where you went.
<schjetne>
beach: I stayed at home (meant to get my PPL current again, but weather got in the way), but more importantly I want to discuss some consulting opportunities at my company. What do you prefer, email?
<beach>
Sure, let's start with that.
<schjetne>
They you'll hear from me some time this week.
<beach>
Sounds good.
nowhere_man has joined #lisp
<dim>
when playing with unicode variable names, don't forget about the ++ (using zero-width space) (you could use more than one)
<aeth>
dim: but at least it's clear that it's a constant
<dim>
(let ((a ') (b ')) (eq a b)) is nil, of course
<dim>
there's also the invisible separator character:
<dim>
and the invisible plus character:
Cymew has quit [Read error: Connection reset by peer]
<dim>
and more
lumm has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
GreaseMonkey has joined #lisp
<jackdaniel>
I can't see them
<jackdaniel>
probably that invisibility thing ;-)
orivej has joined #lisp
_whitelogger has joined #lisp
random-nick has joined #lisp
m00natic has joined #lisp
<dim>
I'm using rcirc in Emacs, so I can place my cursor and then use C-x = runs the command what-cursor-position to have information about the chars
<dim>
otherwise, yeah, the whole point is that we can't see them ;-)
<smokeink>
and what useful tricks can you do with them ?
fikka has joined #lisp
<dim>
useful? I don't know about useful, I know about the dangers of using unicode symbols in variable names when programming…
<dim>
well symbols at large, even
<jackdaniel>
always stick to 16 bit numbers and 7 bit characters, that's what they say -)
m00natic has quit [Ping timeout: 260 seconds]
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
quipa has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
igemnace has quit [Quit: WeeChat 2.2]
zfree has quit [Quit: zfree]
milanj has joined #lisp
ebzzry has joined #lisp
makomo has joined #lisp
fikka has joined #lisp
smokeink has quit [Remote host closed the connection]
<makomo>
yeah, you can, but then you get an error while READing
<makomo>
"can't read #. while *READ-EVAL* is NIL"
<no-defun-allowed>
What would you gain from a new parser then?
<no-defun-allowed>
If you have bad syntax, you're screwed either way.
<Shinmera>
Could do a whole bunch of hooey by depending on eclector, etc.
<Shinmera>
But I'd rather keep it simple.
<makomo>
Shinmera: maybe throw an error if LEVEL goes negative?
<makomo>
no-defun-allowed: yeah, but READ will try to evaluate #. or fail if it's disabled
<makomo>
this will "read" #. as well
<Shinmera>
How would that help? It terminates if the level goes to zero.
<Shinmera>
It should never go negative anyway.
<makomo>
Shinmera: er right, woops
Bronsa has quit [Ping timeout: 268 seconds]
pierpal has joined #lisp
Kundry_Wag has joined #lisp
HarpoRoeder has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
pierpal has quit [Ping timeout: 240 seconds]
Bronsa has joined #lisp
HarpoRoeder has left #lisp ["Leaving"]
fikka has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
Patzy_ is now known as Patzy
fikka has joined #lisp
lnostdal has joined #lisp
eminhi has joined #lisp
ski has joined #lisp
razzy has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
dddddd has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 256 seconds]
razzy has joined #lisp
markong has joined #lisp
markong has quit [Client Quit]
markong has joined #lisp
markong is now known as markoong
Xof has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
eminhi has quit [Quit: leaving]
mindCrime has joined #lisp
Kundry_Wag has joined #lisp
m00natic has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
Bike has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
nowhere_man has joined #lisp
justinmcp has joined #lisp
pierpal has joined #lisp
jkordani has joined #lisp
heisig has quit [Quit: Leaving]
pierpal has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
koenig2 is now known as koenig
Denommus has joined #lisp
thawes has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
krator44 has left #lisp [".."]
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
tralala has quit [Quit: out]
eminhi has joined #lisp
lumm has quit [Remote host closed the connection]
lumm has joined #lisp
jkordani_ has joined #lisp
jkordani has quit [Ping timeout: 256 seconds]
pierpal has joined #lisp
cage_ has joined #lisp
marvin2 has quit [Ping timeout: 272 seconds]
jack_rabbit has quit [Ping timeout: 255 seconds]
atgreen has quit [Ping timeout: 272 seconds]
crsc has joined #lisp
fikka has joined #lisp
atgreen has joined #lisp
crsc has quit [Quit: leaving]
Inline has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
mindCrime has quit [Ping timeout: 240 seconds]
crsc has joined #lisp
sjl__ has joined #lisp
steiner has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
steiner has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
shymega has joined #lisp
meepdeew has joined #lisp
meepdeew has quit [Remote host closed the connection]
easye has joined #lisp
wheelsucker has joined #lisp
loli has quit [Quit: WeeChat 2.2]
mindCrime has joined #lisp
MetaYan has joined #lisp
lumm has quit [Quit: lumm]
cgay has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
lumm has joined #lisp
cgay has joined #lisp
zigpaw has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
quazimodo has joined #lisp
nika has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
MetaYan has quit [Quit: leaving]
fikka has joined #lisp
Achylles has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
mishoo has joined #lisp
robotoad has joined #lisp
quazimodo has quit [Ping timeout: 268 seconds]
quazimodo has joined #lisp
Josh_2 has joined #lisp
igemnace has joined #lisp
remix2000 has joined #lisp
varjag has joined #lisp
meepdeew has joined #lisp
figurelisp has quit [Quit: Lost terminal]
<meepdeew>
Is parenscript the normal way to handle anything front-end from CL?
zfree has joined #lisp
<antoszka>
not necessarily
<Shinmera>
I just don't use JS if I don't have to.
<antoszka>
you can write your frontends in whatever you like and just define protocols speaking to your backend
<antoszka>
as in the non-lisp world
<meepdeew>
M'okay
shka_ has quit [Quit: WeeChat 1.9.1]
ebrasca has quit [Ping timeout: 268 seconds]
phaecian has joined #lisp
ebrasca has joined #lisp
quipa has quit [Ping timeout: 240 seconds]
<Demosthenex>
newbie question. which is better practice, (cdr (assoc ...)) or (alexandria:assoc-value ...)
<Demosthenex>
aside from the length ;]
<Shinmera>
whichever you prefer.
<Demosthenex>
given they are about the same lenght, i'd stick to (cdr (assoc)) just because there's an argument for staying at the low level when a lib isn't needed
<Shinmera>
Sure. On the other hand, a lot of people use alexandria anyway and if you depend on other libraries it's likely you'll have it in your tree already.
<AeroNotix>
Shinmera: have you had commonqt building on arch recently?
<Shinmera>
I don't build CommonQt, so no
fikka has quit [Ping timeout: 265 seconds]
<AeroNotix>
Right
Jachy has joined #lisp
<Jachy>
If you're using the same key over and over, perhaps a tactful function you define is in order too.
<Shinmera>
Qtools still works just fine.
<AeroNotix>
Looking into it
<Shinmera>
If you want to use just CommonQt, you should also be able to load qt+libs instead of commonqt
<Shinmera>
that's commonqt using qt-libs.
<AeroNotix>
the quicklisp package named "qt+libs"?
<AeroNotix>
Well, that QL'd
<Shinmera>
no, the quicklisp package is called commonqt, but the system is called qt+libs
<AeroNotix>
okay
buffergn0me has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
pjb has joined #lisp
<AeroNotix>
I quickloaded qt+libs but the conv.lisp example claims the qt package is not available. Should the conv example work immediately after qt+libs?
<AeroNotix>
qt+libs being pulled in*]
<Shinmera>
Works for me.
<Shinmera>
as in, the QT package exists
<AeroNotix>
quickloading qt stumbles on compiling the so file. Running the commands in the commonqt directory tells me that smoke.h is unavailable but I'm unable to see which package on Arch brings that in. Hence my original question
<Shinmera>
qt+libs is literally just commonqt with precompiled libs.
nika has quit [Quit: Leaving...]
<AeroNotix>
removing all the install Qt related librarys, running (ql:quickload :qt+libs) and running the conv.lisp example with `sbcl --load conv.lisp` tells me that QT is not a designated package
<AeroNotix>
libraries*
<Shinmera>
uh, if you just load a lisp file from the command line it won't magically load systems in for you
<Shinmera>
it's a fresh sbcl process.
<AeroNotix>
ah sorry derp, yeah. I assumed the conv.lisp file would've been doing it.
<AeroNotix>
Same difference. Fails to quickload qt:
Achylles has quit [Remote host closed the connection]
<AeroNotix>
OPERATION-ERROR while invoking #<COMPILE-OP > on
<AeroNotix>
#<CPP->SO "qt" "so" "commonqt">
<AeroNotix>
running qmake/make in the qt directory fails with smoke.h not being found.
<Shinmera>
Don't load commonqt, load qt+libs as I've been saying!
<AeroNotix>
oh I get you. I thought you meant load qt+libs separately to pull in dependencies and then use the commonqt package going forward
<Shinmera>
No.
<AeroNotix>
OK
schweers has quit [Remote host closed the connection]
slyrus1 has quit [Ping timeout: 255 seconds]
<AeroNotix>
Right yeah works now
fikka has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
buffergn0me has quit [Ping timeout: 255 seconds]
papachan has quit [Ping timeout: 240 seconds]
meepdeew has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 252 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
emaczen has joined #lisp
<emaczen>
How do I open a jpeg file and read the bytes? When I open the file in emacs I see a bunch of bytes of the form \324\365 etc... and some occasional letters in between
<emaczen>
the :external-format parameter to #'open seems to be very limited
<Shinmera>
use :element-type (unsigned-byte 8) in open.
asarch has joined #lisp
<Shinmera>
The external-format is for characters, not for byte streams.
housel has quit [Remote host closed the connection]
<emaczen>
Shinmera: Thanks! I just glossed right over that keyword since I saw external-format..
rozenglass has quit [Ping timeout: 240 seconds]
rozenglass has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
meepdeew has joined #lisp
Bronsa has quit [Ping timeout: 272 seconds]
<emaczen>
would cffi:foreign-array-to-lisp be any faster than initializing an array, looping to evaluate (setf (aref ...) ...)?
<phoe>
emaczen: depends on what you want to do with it
<phoe>
foreign-array-to-lisp is copying
<emaczen>
phoe: I want to write it to a CCL socket
<phoe>
why use CFFI at all?
<emaczen>
phoe: because I have a foreign pointer from evaluating mmap
<phoe>
emaczen: oh, I see
troydm has quit [Ping timeout: 240 seconds]
<phoe>
hm, foreign-array-to-lisp might be the best thing to do in that case
<phoe>
either that, or you somehow map that space to a Lisp static-vector
<phoe>
in which case you could avoid copying
<Shinmera>
static vectors only go Lisp->C not the other way around
<phoe>
I see
pierpal has quit [Quit: Poof]
<Shinmera>
Or, more precisely, you can't create a static-vector from a pointer.
pierpal has joined #lisp
<phoe>
I wonder if LOOP with CFFI:MEM-AREF wouldn't be the best
jkordani has joined #lisp
<phoe>
if the overhead of repeating mem-aref wouldn't be smaller than the overhead of array copying
<emaczen>
So something like (loop (write-byte (mem-aref ...)......))?
<phoe>
emaczen: well, not an infinite loop, of course
<emaczen>
phoe: of course
<phoe>
but something like that, I think
<phoe>
check what's the fastest for you
<phoe>
benchmark and such
<phoe>
Shinmera: why is that so? I mean, what's the limitation?
<phoe>
Theoretically, if you have a foreign pointer and a length, that's theoretically enough for you to create an Lisp array object
<Shinmera>
uh, how would the lisp implementation form the vector structure around the pointer? It doesn't know what's before or after that piece of memory
<phoe>
It wouldn't be managed by GC, of course
ym has joined #lisp
<phoe>
Shinmera: it would need to be something like a displaced array that just "points" to the storage there
<Shinmera>
right, but such a functionality is simply not exposed by most implementations.
<phoe>
Shinmera: I see.
<Shinmera>
mostly because it's a headache and would require an entirely separate kind of structure of array.
jkordani_ has quit [Ping timeout: 240 seconds]
<Shinmera>
You can't just re-use displaced arrays for it.
<phoe>
Yep, I see.
<phoe>
It's literally just a performance hack.
FreeBirdLjj has joined #lisp
<Shinmera>
Plus C functions that return a chunk of memory (that isn't just static) are Bad and Not Good anyway. :)
<phoe>
(:
<phoe>
Though the best thing that could happen, I think, is an implementation compiling a LOOP over MEM-AREF to simple pointer dereference.
<phoe>
At least performance-wise.
<phoe>
We're using raw memory so all safety checks are off anyway. Segfaults can be caught and handled in the Lisp condition world.
<Shinmera>
segfaults can only be handled in the "pray not everything will burn in the next processor cycle"
<Shinmera>
way
<phoe>
...given that we don't corrupt ourselves along the way, of course.
<phoe>
Yes. Exactly what I mean.
<Shinmera>
And sometimes memory doesn't burn, it just smoulders and things simply get weird.
<Shinmera>
Ah, fond times debugging Harmony....
zooey has quit [Ping timeout: 250 seconds]
<phoe>
Shinmera: I don't know what you're talking abCORRUPTION WARNING in SBCL pid 22144(tid 0x7ffff5527700): Memory fault at (nil) (pc=0x228c3f60, sp=0x7ffff5525d18)
igemnace has quit [Quit: WeeChat 2.2]
<Shinmera>
Well I'm talking about not that happening, and instead things just going full schrödinger
<phoe>
oooh, sounds like interesting times
<Shinmera>
Writing to adjacent memory won't segfault after all.
ebrasca has quit [Remote host closed the connection]
housel has joined #lisp
fikka has joined #lisp
zooey has joined #lisp
phaecian has quit [Ping timeout: 264 seconds]
Oddity has quit [Ping timeout: 260 seconds]
<phoe>
that's correct
meepdeew has quit [Remote host closed the connection]
troydm has joined #lisp
Oddity has joined #lisp
Duns_Scrotus has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
shka_ has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
<gendl>
Hi, with Slime/Swank, is there a named stream I can write to which is the *slime-repl ... * ?
<phoe>
gendl: *standard-output*, theoretically
<Bike>
*terminal-io* or *standard-output*?
<phoe>
the REPL as a whole is more complex than a simple mere stream
<jackdaniel>
gendl: in slime repl type (defvar *xxx* *standard-output*)
<jackdaniel>
and you may write to *xxx*
<jackdaniel>
and output will appear in slime repl
<jackdaniel>
(you may write to *xxx* from anywhere, like from inferior lisp)
<jackdaniel>
since you may have many swank connections at the same time, there is no single named "slime repl"
fikka has quit [Ping timeout: 240 seconds]
<gendl>
jackdaniel: Thanks. Yes, i see *standard-input* and *standard-output* appears to be locally bound in each slime repl, as well as *inferior-lisp*
<gendl>
so that will work for *standard-input* as well -- but that initial defvar has to be entered somehow in the actual *slime-repl...* buffer that you want to target.
<gendl>
No way to get a list internally
<gendl>
I take it those are some kind of thread-local variables within each *slime-repl * ?
<jackdaniel>
there is *globally-redirect-io* in swank-repl but I don't know what it does and how it works exactly
fikka has joined #lisp
SenasOzys has joined #lisp
zigpaw has joined #lisp
<White_Flame>
gendl: special variables are thread-local whenever they're locally bound
<emaczen>
pjb: Will you look at my question on #ccl?
<Demosthenex>
so i'm having a problem debugging in slime. it's throwing up a common error (typedef, not list) in a function, but slime isn't showing me any details of the calling point (ie: line number, etc). any hints?
<White_Flame>
so (let ((*print-pretty* nil)) (format t ...)) will disable pretty printing locally, even though *print-pretty* might still be true for all the other running threads
sauvin has quit [Read error: Connection reset by peer]
<jackdaniel>
Demosthenex: you have frames listed
<jackdaniel>
which show backtrace
<Demosthenex>
yeah, function name, and then assoc-eq. no locals.
<jackdaniel>
if you type "v" on the frame which interests you, you'll get transferred to the source code
<White_Flame>
gendl: also, if you print to *standard-output* from new threads, the output tends to go into the emacs *inferior-lisp* buffer
<jackdaniel>
if you type tab, you'll get some details
<Demosthenex>
jackdaniel: v fails
SenasOzys has quit [Ping timeout: 268 seconds]
<jackdaniel>
that's very descriptive
<shka_>
Demosthenex: you may need to optimize for debug in order for it work, but it should do something nonetheless
<Demosthenex>
Error: Failed to find the TRUENAME of SYS:SRC;CODE;LIST.LISP: No such file or directory. which is odd, because i have the code open in another buffer
<shka_>
it will certainly fail if file is not local
<gendl>
White_Flame: Yep I noticed that, e.g. from an AllegroServe thread.
<jackdaniel>
sorry, not tab but enter for details
<jackdaniel>
Demosthenex: you probably pressed v on first frame
<Demosthenex>
its a local file. and there are no details on enter. that's why i'm confused
<jackdaniel>
it tries to get you to the topmost level, which is in sbcl sources
<jackdaniel>
I take you don't have sbcl sources on your disk
<shka_>
Demosthenex: swank and slime are in the same version, right?
<jackdaniel>
navigate to something lower (i.e with recotnizable name)
<jackdaniel>
recognizable*
<Demosthenex>
shka_: its 2.1 vs 2.2, maybe that's my issue
<gendl>
But I can make one of the thread-local *standard-input* or *standard-output* to be global, by defvar'ing a new variable to it in the particular buffer which I want to read from, or target. Good trick.
<gendl>
well, not really making those variables global, but making new variables which are global, which point to those local ones.
<jackdaniel>
I see my advices are not really needed, then I'll get to my book and leave you in shka's hands. I told you: your problem is: a] lack of sbcl sources; b] trying to navigate wrong frame source
<shka_>
Demosthenex: unlikely, but i would rather attempt to eliminate this possiblity
<White_Flame>
gendl: when you launch a thread, there also might be options for which special variables to copy from the original thread
<shka_>
jackdaniel: the pressure!
<White_Flame>
gendl: though I don't know exactly where the IO special vars get bound on thread launch
<jackdaniel>
well, you'll certainly have fun, because you lead him to a wasteland (since nothing indicates problem with slime/swank mismatch). good night \o
<Demosthenex>
np, just looking for advice. i've read the help a few times and the bindings, and made little progress
<White_Flame>
gendl: I would assume that the SLIME REPL has its own local binding to the emacs connection, while the global *standard-output* is the plain one hitting the OS stream captured by *inferior-lisp*
nowhere_man has joined #lisp
SenasOzys has joined #lisp
<shka_>
Demosthenex: anyway, you are sure that you have that source file on the disk, right?
<Demosthenex>
yeah, its here. i'm looking at it and just... i'm doing a simple operating appending a few cons cells to a list :P
<Demosthenex>
and haven't put my finger on where or why the error
<shka_>
Demosthenex: that is actually quite easy to understand!
<Demosthenex>
basically i have an alist of decoded json data, and i need to add a few values to the alist before i convert it to a plist for postmodern to insert it
<Demosthenex>
and... i was using (cons (cons k v) oldlist) repeatedly, but i had several things to add
fikka has quit [Ping timeout: 268 seconds]
<Demosthenex>
so append with a dynamically built list looked ok to me
random-nick has quit [Read error: Connection reset by peer]
<shka_>
well, yeah
<shka_>
Demosthenex: the function is INSERT-JSON-MATCH
<shka_>
right?
cage_ has quit [Quit: Leaving]
<Demosthenex>
and the frustrating thing is the functions over a screen page long, but slime's not showing the line. i've isolated it by cutting out code and adding log:infos.... which is barbaric.
<Demosthenex>
yep
<shka_>
ok
papachan has joined #lisp
<Demosthenex>
slime jumping to code is also jumping into a cons definition, which... at first glance isn't a problem
<shka_>
so first of, adding optimize debug 3 declaration and recompiling should help with better stack trace
<shka_>
secondly, you should inspect not 0 stack frame but 1
<shka_>
0 is just part of cl implementation
<shka_>
third of, you will not see this on stack trace, because assoc was clearly inline
<shka_>
but this stack trace is from ASSOC function
<shka_>
you have two calls to assoc here
<Demosthenex>
that was useful. i added the debug 3 and recompiled the function and now much more detail
<shka_>
i know, right?
<shka_>
anyway
<shka_>
check value of x
<Demosthenex>
that's why i ask her e;]
<shka_>
you can do that by pressing enter when cursor is over it in debbugr
<shka_>
text cursor
<shka_>
not mouse cursor :-)
<Demosthenex>
yeah, i have alot more data there now
<shka_>
i suspect that x is not well structured list
<Demosthenex>
i'm chewing on it ;]
<Demosthenex>
yeah, json crap
<shka_>
alist to be precise
<shka_>
so imho you should check if you have stray elements instead of (key . value) in there
<shka_>
you can do that manually, or by using eval functionality of debugger
flip214 has joined #lisp
flip214 has quit [Quit: leaving]
<Demosthenex>
yep, my fault, wrong list. just.... hard to dig it out until i had debug 3
<Demosthenex>
thanks!
<shka_>
you are welcome
<Demosthenex>
i mistakenly used the list of columns instead of the list of json
<Demosthenex>
but... it was opaque until i got debug 3
<shka_>
yes
<Demosthenex>
which i've added to my file permanently now ;]
<shka_>
that's how it works
<shka_>
well, that works
<shka_>
but adding declare optimized debug 3 in function definition is good as well
<shka_>
anyway, there are some useful video tutorials on slime debugger on youtube
<shka_>
slime debugger is quite good, but not that easy to use!
lavaflow has quit [Ping timeout: 260 seconds]
<shka_>
so watching it may help if you are new
<Demosthenex>
i knew to chalk it up to my inexperience, it's just describing what i'm after is tough when you're new ;]
<shka_>
yeah
<shka_>
anyway, glad you solved it
<Demosthenex>
omg, (break) and single step mode is something i'd been looking for too
<Demosthenex>
thanks for your patience.
<shka_>
you are welcome
<shka_>
besides i could not disappoint jackdaniel
<shka_>
;-)
<AeroNotix>
spite based help
<shka_>
Demosthenex: yes, slime debugger is fully featured and has everything you would expect nowdays
<Demosthenex>
shka_: i expect so. i've been using debuggers since... borland pascal on 8086? ;]
<Demosthenex>
just didn't understand why i had no depth. it was the debug option
<shka_>
yeah
<shka_>
good
<shka_>
AeroNotix: perhaps motivated would be a better way to phrase it :P
<shka_>
but i mostly got used to jackdaniel and simply wear fully sealed hazard suite each time i am talking with him so no worries
LdBeth has joined #lisp
<shka_>
Demosthenex: anyway, good luck, obviously don't hesitate to ask your other questions here
<LdBeth>
GG, suddenly kicked out
flip214 has joined #lisp
<AeroNotix>
jackdaniel: it used to be much friendler in here. Noticed a spike in flaming since I last was more active.
<AeroNotix>
meant for shka_ ^
<AeroNotix>
off topic anyway
<shka_>
AeroNotix: hopefully is not my fault
<shka_>
i am trying to be helpful :(
dale_ has joined #lisp
dale has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
dale_ is now known as dale
vlatkoB has quit [Remote host closed the connection]
<Demosthenex>
either way i appreciate it ;] i'm really enjoying using CL to parse this mishmash of data... it's much more flexible than something like static coding in python would be
<Demosthenex>
now if i can get a few million league matches loaded in my db, i'll be really excited
kajo has joined #lisp
<shka_>
Demosthenex: shouldn't be a problem
<dim>
what's the source format Demosthenex?
<shka_>
postmodern is pretty good
<Demosthenex>
dim: a restful json api from riot
<dim>
also to write to PostgreSQL, use the COPY support
<shka_>
dim: good point
<dim>
in Postmodern, that's well supported
<shka_>
yes
<Demosthenex>
meh, i have to make a call at a time to get the data, there's no bulk loading here with the rate limiter
<dim>
see the copier api
<Demosthenex>
so i did enjoy prototyping the DB using the json support in postgres, which worked great in postmodern
<sabrac>
ping me if you need any help with postmodern
<Demosthenex>
no, it's been sweet to use.
<Demosthenex>
well documented, and i love that huge page of examples
<Demosthenex>
though it had nothing on transactions, but that was documented in the postmodern code base
rozenglass has quit [Remote host closed the connection]
<Demosthenex>
so i had GIN indexes on json data, and views into deep structures in this multilevel data... and it was ok for a few thousand records
<Demosthenex>
but i noticed that integer operations were really slow, so i think if i'm not indexing a field it has to parse integers from string in the json data every time.
<Demosthenex>
so summing or sorting on an embedded field was hugely slow compared to a native integer column
<sabrac>
working on transactions documentation. Also adding isolation level support, but probably not interesting to you
<Demosthenex>
so now i'm making traditional tables and inserts using postmodern s-sql.
aindilis has quit [Ping timeout: 240 seconds]
<Demosthenex>
yeah my transaction is simply wrapping all the parts for a single data object across tables. if one fails all should fail. it's read only data for reporting
<sabrac>
At some point I want to add more support for json, but it is complicated because there are so many different cl libraries for json
<shka_>
sabrac: oh, so you are maintaining postmodern now days?
<sabrac>
yes
<shka_>
sabrac: awesome, i am using postmodern every day!
<shka_>
thanks for doing this!
<Demosthenex>
very nice
<sabrac>
shka: just sent you a pm
<shka_>
sabrac: got it
FreeBirdLjj has quit [Remote host closed the connection]
charh has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
fikka has joined #lisp
Posterdati has joined #lisp
FreeBirdLjj has quit [Ping timeout: 265 seconds]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
X-Scale has quit [Ping timeout: 272 seconds]
random-nick has joined #lisp
<Demosthenex>
ugh, i think my only complain atm is how sluggish emacs gets when long lines of json print into the comint buffer
fikka has joined #lisp
<shka_>
eh, sadly, that's just emacs things
X-Scale has joined #lisp
<aeth>
Accidentally print a line a million times? Oops, but emacs is okay. Accidentally print something ending in a space instead of a newline? Time to kill the SLIME REPL buffer.
fikka has quit [Ping timeout: 268 seconds]
<otwieracz>
Well, I've already have a habit of clearing REPL buffer every ten seconds
<otwieracz>
Because emacs with any autocompletion is totally uncapable of any reasonibly-sized buffers.
<Shinmera>
Same :/
<otwieracz>
Like, I feel nervous when REPL propmpt is below 1/2 of a screen
nowhere_man has quit [Ping timeout: 264 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
rumbler31 has joined #lisp
<shka_>
heh
<shka_>
it is not THAT bad
<otwieracz>
Really, I can't number all the times when emacs must have scanned my whole hard drive looking for this non-existant closing paren
fikka has joined #lisp
<otwieracz>
It felt like it reached end of buffer and kept looking
<aeth>
I run paredit on my REPL buffer.
<aeth>
Sometimes it doesn't parse printed output correctly, though
rumbler31 has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 265 seconds]
eminhi has quit [Quit: leaving]
phaecian has joined #lisp
random-nick has quit [Ping timeout: 264 seconds]
Denommus has quit [Remote host closed the connection]
dented42 has joined #lisp
Bike_ has joined #lisp
random-nick has joined #lisp
Bike has quit [Ping timeout: 252 seconds]
sjl__ has quit [Ping timeout: 240 seconds]
Denommus has joined #lisp
angavrilov has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
makomo has quit [Quit: WeeChat 2.2]
shka_ has quit [Ping timeout: 252 seconds]
sjl__ has joined #lisp
Copenhagen_Bram has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
dmiles has quit [Read error: Connection reset by peer]
Copenhagen_Bram has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
borodust has quit [Quit: Leavin']
dmiles has joined #lisp
pierpa has joined #lisp
Copenhagen_Bram has quit [Ping timeout: 264 seconds]
<dim>
Demosthenex: also it might be that you're using JSON instead of JSONB in PostgreSQL?
Bike has joined #lisp
bendersteed has quit [Remote host closed the connection]
AroPar has joined #lisp
SenasOzys has quit [Ping timeout: 252 seconds]
pierpal has quit [Ping timeout: 255 seconds]
lnostdal has quit [Read error: Connection reset by peer]
Denommus has quit [Remote host closed the connection]
wheelsucker has quit [Quit: Client Quit]
AroPar has quit [Quit: Leaving]
mishoo has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 264 seconds]
makomo has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
DGASAU has quit [Read error: Connection reset by peer]
fikka has joined #lisp
Fare has quit [Ping timeout: 252 seconds]
DGASAU has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
sjl_ is now known as sjl
sjl__ has quit [Ping timeout: 260 seconds]
lavaflow has quit [Ping timeout: 268 seconds]
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #lisp
<Demosthenex>
dim: no, jsonb
mange has joined #lisp
<Demosthenex>
dim: and i saw that. i even considered using a virtual copy from my views into tables, but i thought i'd do it in lisp first instead of leaning on the DB
atgreen has joined #lisp
<Demosthenex>
was there a flag somewhere to make postmodern print each query it executes?
Fare has joined #lisp
<Demosthenex>
dim: in the case of numbers, i still had to type cast text to int for comparison constantly, and that was slow.
robotoad has quit [Quit: robotoad]
SenasOzys has joined #lisp
MetaYan has joined #lisp
Fare has quit [Ping timeout: 265 seconds]
quazimodo has quit [Ping timeout: 252 seconds]
quazimodo has joined #lisp
robotoad has joined #lisp
asarch has quit [Quit: Leaving]
lavaflow has joined #lisp
m00natic has quit [Ping timeout: 256 seconds]
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 25.3.2)]
Fare has joined #lisp
Kundry_Wag has joined #lisp
<sabrac>
Demosthenex: No flag in postmodern to force printing of each query.