mflem has quit [Read error: Connection reset by peer]
Guest6423 has quit [Ping timeout: 240 seconds]
try___ has quit [Ping timeout: 276 seconds]
try_ has joined #lisp
_cosmonaut_ has joined #lisp
sjl has joined #lisp
rumbler31 has joined #lisp
varjag has joined #lisp
sjl has quit [Ping timeout: 255 seconds]
rumbler31 has quit [Ping timeout: 276 seconds]
shrdlu68 has joined #lisp
Guest6423 has joined #lisp
SuperJen has quit [Ping timeout: 265 seconds]
milanj_ has quit [Quit: This computer has gone to sleep]
_cosmonaut_ has quit [Ping timeout: 265 seconds]
shrdlu68 has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
quazimodo has quit [Ping timeout: 255 seconds]
quazimodo has joined #lisp
shrdlu68 has quit [Ping timeout: 245 seconds]
SenasOzys has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
gigetoo has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
malice has joined #lisp
[df]_ has quit [Ping timeout: 255 seconds]
pjb2 has joined #lisp
SenasOzys has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
shrdlu68 has quit [Ping timeout: 255 seconds]
pjb2 has quit [Client Quit]
shrdlu68 has joined #lisp
SenasOzys has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
gigetoo has joined #lisp
SenasOzys has joined #lisp
markong has joined #lisp
fikka has joined #lisp
bjorkintosh has quit [Remote host closed the connection]
copec has quit [Ping timeout: 276 seconds]
copec has joined #lisp
[df] has joined #lisp
xiangsheng1 has joined #lisp
SenasOzys has quit [Ping timeout: 263 seconds]
_cosmonaut_ has joined #lisp
DataLinkDroid has quit [Ping timeout: 240 seconds]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #lisp
araujo has quit [Changing host]
araujo has joined #lisp
damke_ has joined #lisp
SenasOzys has joined #lisp
damke has quit [Ping timeout: 264 seconds]
kerrhau has quit [Ping timeout: 268 seconds]
try_ has quit [Quit: leaving]
_cosmonaut_1 has joined #lisp
python476 has joined #lisp
_cosmonaut_ has quit [Ping timeout: 256 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
try has joined #lisp
try is now known as Guest67969
rumbler31 has joined #lisp
Guest67969 has quit [Client Quit]
try_ has joined #lisp
try_ has quit [Client Quit]
frgo has joined #lisp
try_ has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
try_ has quit [Client Quit]
try_ has joined #lisp
try_ has quit [Client Quit]
try has joined #lisp
frgo has quit [Ping timeout: 256 seconds]
try has quit [Client Quit]
try has joined #lisp
try has quit [Client Quit]
Guest5491 has joined #lisp
Guest5491 has quit [Client Quit]
try_ has joined #lisp
try_ is now known as MasouDa
MasouDa has quit [Client Quit]
sjl has joined #lisp
`JRG has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
MasouDa has joined #lisp
sjl has quit [Ping timeout: 264 seconds]
<johnnymacs>
If I have encoded say the number 7 in the lambda calculus how to I convert that to the int 7
cylb has joined #lisp
<jackdaniel>
?
<jackdaniel>
could you provide a code sample which will illustrate how do you encode number 7 in the lambda calculus, observed and expected result?
<phoe>
johnnymacs: that depends on how exactly you encode it.
fikka has joined #lisp
<u0_a183>
whatever alternative representation of numbers you used operations would have to be isomorphic with regular numbers
<TMA>
johnnymacs: insufficient data. if you remain within the lambda calculus variant you are using, the encoded number _is_ the number for all practical purposes
<TMA>
johnnymacs: if you are willing to sidestep it (for example by introducing some alternative encoding of integers or some additional primitives) you have not described the approach sufficiently
<u0_a183>
i think johnnymacs is trying to impliment church encoding or similar
fikka has quit [Ping timeout: 264 seconds]
<phoe>
I assume he has some sort of encoded object and he wants to convert it to something that's human-readable.
flazh1 has quit [Ping timeout: 240 seconds]
ghard```` has joined #lisp
<u0_a183>
have you seen the ebook for zenlisp (actually a scheme variant), he impliments bignums using symbol strings of numerals lol
ghard``` has quit [Remote host closed the connection]
ferada has left #lisp [#lisp]
Kevslinger has joined #lisp
<johnnymacs>
Well my understanding is that in the church encoding zero is a function that takes two arguments and returns the second one
<johnnymacs>
so what I can do is sort of count down by taking my zero function and passing the int 0 into the second argument and see if it returns 0
milanj_ has joined #lisp
<johnnymacs>
if it returns a function then I know I didn't reach zero yet
<u0_a183>
practical computing systems have something close to an integer built in, but we could try list length based encoding...
<loke>
In church numerals, the integer zero can be represented by the identity function.
<loke>
Or a function that reurls itself, perhaps.
<u0_a183>
lambda calculus wizardry is used in optimizations and gets more abstract than i understand...
dpg has joined #lisp
fikka has joined #lisp
Patternmaster has joined #lisp
Kaisyu has joined #lisp
nika has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 240 seconds]
<u0_a183>
so numeral zero (0) would look like (quote (dummy-symbol . nil)) and (defun church-zero? (n) (null (cdr (n))))
_cosmonaut_1 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<theemacsshibe[m]>
(loop for x from 0 for f = (funcall f x) when (numberp f) return x) could work if I remember loop correctly.
<u0_a183>
(defun add-one (n) (cons 'dummy-symbol n)) ;; need to quote arg or make dummy-symbol a list identity function
wxie has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<u0_a183>
there should be a test to tell if list is a valid number before doing arithmatic on it...
<u0_a183>
direct lambda calculus is going to be all defmacros to prevent arguement evaluations isn't it? :/
rumbler31 has quit [Remote host closed the connection]
jason_m has joined #lisp
shrdlu68 has joined #lisp
Kundry_Wag has joined #lisp
dtornabene has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 264 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
pierpa has joined #lisp
shrdlu68 has joined #lisp
<malice>
Is passing arguments the design? I am dealing with SDL2, and there you have window and a renderer. They are tied together (a renderer uses a specific window), and you need to provide renderer when creating a texture and when drawing it. So I either have to pass renderer each time I create new texture, or use alternative solution.
<phoe>
malice: how do you pass the renderer?
<malice>
I could make all of these belong to some base class (sdl-config-class) that would contain all this information as :class allocated slots. I could also define some macro (with-renderer) that would make *renderer* special variable.
<malice>
But both of these have some problems I don't like
<malice>
phoe: I have some texture-loader object that gets the renderer upon creation
<malice>
It is responsible for loading the textures (so it uses renderer to load them). This is the cleanest solution I've found so far.
<malice>
Though this way if I want to load a texture, I have to pass a texture-loader to loading function
<malice>
though it gives me memoization
<phoe>
put the renderer in the texture-loader's slot?
<malice>
Yes, that's what I did.
<phoe>
then (load-texture loader texture) can internally use the slot-value
<malice>
But it's almost the same. Now I'm passing loader instead of renderer.
<phoe>
hah
<malice>
I also get memoization "for free", without passing anything bonus, but still
shrdlu68 has quit [Ping timeout: 240 seconds]
<malice>
hmm
<phoe>
why not a special variable?
<malice>
Well, hard to test.
shrdlu68 has joined #lisp
<phoe>
no, why?
<phoe>
simply be sure to only bind that variable in one place in your code and make sure it never gets rebound.
<phoe>
optionally create a (with-renderer (...) ...) macro that abstracts this away from you
<phoe>
then you can go (defun test-stuff () (with-renderer (renderer (make-renderer)) (frobnicate renderer)))
<malice>
I'm trying to proceed with caution when doing that. I feel uneasy when dealing with special variables.
<malice>
I get a feeling they make things harder to debug and the implicit information might make some bugs hard to find
<malice>
But maybe I'm overreacting
<malice>
Also that would mean *renderer* is a banned name now
<malice>
(or something similar)
<phoe>
malice: not banned, simply bound.
<phoe>
if your code starts binding *renderer* somewhere else, it would most likely mean bad code design for me
<phoe>
when you deal with magical singleton global objects like that, special variables are often the way in Lisp
<phoe>
but since it's SDL2, you could possibly ask #lispgames how they deal with that issue
shrdlu68 has quit [Ping timeout: 265 seconds]
makomo has joined #lisp
<malice>
I could also try to utilize closures
<phoe>
and have EVEN harder debuggability.
<malice>
are they?
shrdlu68 has joined #lisp
<phoe>
you can easily inspect special variables when they're on the stack. with closures, you tend to have more issues.
flazh1 has joined #lisp
<phoe>
since the variables are hidden, and often lexical.
<White_Flame>
I've had to deal with lots of these issues. If you have a context object that every function in a chain needs to know about, that's really what special variables are for
<White_Flame>
and it's nice and threadsafe (for as much as that matters with SDL)
<phoe>
after you go (let ((x (make-secret-object))) (lambda () (poke x)) then you will no longer be able to refer to the value of the variable X.
<phoe>
White_Flame: oi
dpg has quit [Ping timeout: 246 seconds]
<phoe>
with threads you need to make sure that their initial special bindings are specified.
wxie has quit [Remote host closed the connection]
<phoe>
#'BT:MAKE-THREAD has a keyword argument exactly for that
<malice>
I see. So it's either passing the loader or using a special variable, it seems.
Rovanion has left #lisp ["WeeChat 1.4"]
gigetoo has quit [Ping timeout: 264 seconds]
nmajo has quit [Ping timeout: 260 seconds]
<phoe>
well, either you pass it explicitly as an argument or implicitly as a special var
gigetoo has joined #lisp
<phoe>
you have to pass it *somehow* but you won't magically make it go away altogether.
<phoe>
using special vars in this case is merely a way to reduce verbosity in your code so you don't pass the loader *everywhere* but only mention it whenever you need to actually use it.
<White_Flame>
sure you can, just hardcode it ;)
tomlukeywood has joined #lisp
<malice>
Reducing verbosity was one of my goals, but I will have to think if it's worth it.
<malice>
Thank both of you for help :)
myrkraverk has joined #lisp
nmajo has joined #lisp
Misha_B has joined #lisp
tomlukeywood has quit [Quit: tomlukeywood]
capitaomorte has joined #lisp
jmercouris has joined #lisp
damke has joined #lisp
jmercouris has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 265 seconds]
Bike has joined #lisp
EvW has joined #lisp
zbir has joined #lisp
MasouDa_ has joined #lisp
MasouDa_ has quit [Client Quit]
nirved has quit [Quit: Leaving]
rumbler31 has joined #lisp
pagnol has joined #lisp
Kundry_Wag has joined #lisp
milanj__ has joined #lisp
MasouDa_ has joined #lisp
milanj_ has quit [Read error: Connection reset by peer]
rumbler31 has quit [Ping timeout: 260 seconds]
MasouDa_ has quit [Quit: Lost terminal]
shrdlu68 has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
`JRG has joined #lisp
MasouDa_ has joined #lisp
MasouDa_ has quit [Client Quit]
nmajo has quit [Ping timeout: 264 seconds]
okflo` has joined #lisp
nirved has joined #lisp
okflo has quit [Ping timeout: 264 seconds]
nmajo has joined #lisp
dyelar has joined #lisp
siraben has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Patternmaster has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Lord_Nightmare has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 256 seconds]
dyelar has quit [Quit: Leaving.]
oleo has joined #lisp
Lord_Nightmare has joined #lisp
attila_lendvai has joined #lisp
scymtym has joined #lisp
fikka has joined #lisp
_cosmonaut_ has quit [Ping timeout: 240 seconds]
nullman has quit [Ping timeout: 255 seconds]
pierpa has quit [Read error: Connection reset by peer]
dieggsy has joined #lisp
nullman has joined #lisp
Satou has joined #lisp
heisig has quit [Quit: Leaving]
pierpa has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
raynold has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
sjl has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
zbir` has joined #lisp
zbir has quit [Ping timeout: 240 seconds]
zbir` is now known as zbir
Kundry_Wag has quit [Remote host closed the connection]
xiangsheng1 has quit [Quit: WeeChat 2.1]
pmetzger has joined #lisp
pagnol has quit [Ping timeout: 240 seconds]
pagnol has joined #lisp
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Cymew has quit [Remote host closed the connection]
pagnol has quit [Ping timeout: 260 seconds]
warweasle has joined #lisp
Cymew has joined #lisp
al-damiri has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
pagnol has joined #lisp
rumbler31 has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
wheelsucker has joined #lisp
Cymew has joined #lisp
edgar-rft has quit [Quit: edgar-rft]
fikka has joined #lisp
yeticry has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 268 seconds]
Cymew has joined #lisp
yeticry has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
fikka has joined #lisp
igemnace has joined #lisp
pierpa has quit [Read error: Connection reset by peer]
yeticry has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
pierpa has joined #lisp
yeticry has joined #lisp
Cymew has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
Cymew has quit [Ping timeout: 265 seconds]
Cymew has joined #lisp
fikka has joined #lisp
rumbler3_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 264 seconds]
rumbler3_ has quit [Ping timeout: 265 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
nika has joined #lisp
jdz has quit [Ping timeout: 256 seconds]
quazimodo has quit [Read error: Connection reset by peer]
Cymew has quit [Ping timeout: 276 seconds]
nika has quit [Read error: Connection reset by peer]
uint_ has quit [Remote host closed the connection]
TeMPOraL has quit [Quit: WeeChat 2.0.1]
jackdaniel has quit [Read error: Connection reset by peer]
damke has joined #lisp
karswell_ has quit [Remote host closed the connection]
jackdaniel has joined #lisp
karswell_ has joined #lisp
fikka has joined #lisp
pierpa has quit [Quit: Simple IRC: The quit option.]
otwieracz has joined #lisp
Karl_Dscc has joined #lisp
pierpa has joined #lisp
FreeBirdLjj has joined #lisp
foom2 has joined #lisp
foom has quit [Read error: Connection reset by peer]
Karl_Dscc has quit [Remote host closed the connection]
<makomo>
is there anything like the classical "continue" for LOOP?
<Shinmera>
No, but it's typically not needed either.
jackdaniel has quit [Quit: ZNC 1.6.5 - http://znc.in]
jackdaniel has joined #lisp
<makomo>
well it sure would come in handy
hhdave has quit [Ping timeout: 260 seconds]
* pierpa
never felt the need
<makomo>
for example, i have multiple for clauses of which the first one is an actual "counting" variable with the rest are just "helper" variables
<makomo>
if one of these helper variables is nil for example, i would like to skip the current iteration
<makomo>
what would good alternatives be
<Bike>
conditions
<Bike>
unless helper ...more clauses...
<makomo>
yup, that's the problem
<Bike>
or rather unless (null helper)
<makomo>
oh wait, i misinterpreted that
<Shinmera>
Bike: or rather when helper
<makomo>
yes, but i get an error saying that :for is not a valid clause that can follow a :when
<makomo>
this :for helper is inbetween other :fors
ophan has joined #lisp
<makomo>
some of the helpers further below depend on the helpers above
<makomo>
if one of the above is nil, i want to bail immediately
<Shinmera>
How about something like (loop for thingy = (let* (.. other fors ..) ..) when thingy count thingy)
MasouDa has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
<makomo>
well that's something i was trying to avoid, because it always looks so horrible
<makomo>
and gets indented so horribly also
<nirved>
iterate has next-iteration
gigetoo has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
<makomo>
Shinmera: also, that wouldn't allow me to use those other helpers later on in the body of :when
<Shinmera>
well the point is that you don't need to
<Shinmera>
since the let block does all the actual work
<makomo>
yes, but these helpers are helpers for the body, not just for the initialization of these others :fors
<makomo>
i would like to use all of these variables in the body
<makomo>
reuse some results, etc.
<makomo>
but it's not even related to reusage, rather just to usage
SaganMan has joined #lisp
<makomo>
A depends on B, but if B is nil i want to bail. if it isn't, calculate A and then use A in the body
shka_ has joined #lisp
<Shinmera>
Maybe just not using LOOP's features aside from an infinite loop in the first place would be better, given that I get the feeling whatever you're doing is going to be a mess no matter what.
Kundry_Wag has quit [Remote host closed the connection]
ircbrowse_ has quit [Quit: Quit]
Kaisyu has quit [Quit: Connection closed for inactivity]
<pierpa>
move on to iterate
jackdaniel has quit [Quit: ZNC 1.6.6 - http://znc.in]
Kundry_Wag has joined #lisp
jackdaniel has joined #lisp
Anthaas_ has joined #lisp
MasouDa has joined #lisp
dieggsy has quit [Read error: Connection reset by peer]
dieggsy has joined #lisp
jackdaniel has quit [Quit: ZNC 1.6.6 - http://znc.in]
dieggsy has quit [Read error: Connection reset by peer]
<phoe>
^
jackdaniel has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 263 seconds]
<makomo>
hmh, i was trying to avoid including an external library. i've taken a look at iterate before, guess i'll go and try it out then
jackdaniel has quit [Client Quit]
Cymew has joined #lisp
jackdaniel has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
pierpa has quit [Ping timeout: 256 seconds]
jackdaniel has quit [Quit: ZNC 1.6.6 - http://znc.in]
Cymew has quit [Ping timeout: 264 seconds]
jackdaniel has joined #lisp
Cymew has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
d4ryus1 is now known as d4ryus
damke_ has quit [Ping timeout: 264 seconds]
jealousmonk has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
raynold has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
jackdaniel has quit [Quit: ZNC 1.6.6 - http://znc.in]
Cymew has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
jackdaniel has joined #lisp
nika has quit [Quit: Leaving...]
Cymew has quit [Ping timeout: 240 seconds]
slyrus1 has quit [Quit: slyrus1]
Cymew has joined #lisp
Pixel_Outlaw has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
Cymew has joined #lisp
gigetoo has quit [Ping timeout: 260 seconds]
damke_ has joined #lisp
gigetoo has joined #lisp
slyrus1 has joined #lisp
lnostdal has quit [Ping timeout: 245 seconds]
damke has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 276 seconds]
Cymew has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
Folkol has quit [Read error: Connection reset by peer]
<makomo>
"Almost all clauses use the syntax of function keyword-argument lists: alternating keywords and arguments. iterate keywords don't require a preceding colon, but you can use one if you like."
Cymew has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
serviteur has quit [Remote host closed the connection]
<makomo>
using a colon implies using keyword symbols, but that doesn't seem to work. am i reading that wrong?
<phoe>
it does not seem to work for me either
<phoe>
hm
<phoe>
(iter (for i :in '(1 2 3 4 5)) (sum i)) works
<phoe>
but :for or :sum does not
nowhereman_ has quit [Remote host closed the connection]
nowhereman_ has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
<makomo>
yeah, that's why i'm not sure what that line is supposed to mean
energizer has joined #lisp
<makomo>
maybe it was referring to everything but the first keyword
Cymew has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
fikka has joined #lisp
mhitchman[m] has joined #lisp
<sjl>
The first symbol must be the non-keyword symbol. The rest can be keywords if you prefer
<makomo>
i see
<sjl>
makomo: and yeah it's intended that you :use the package. It should work if you don't, but it'll be a bit ugly.
<sjl>
or just import the specific symbols you want, but that's also annoying to have to do. I generally just use it.
<makomo>
yeah, true
Cymew has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
<pierpa_>
they're using "keyword" as a normal English word, not in the technical sense of a CL keyword.
energizer has quit [Remote host closed the connection]
energizer has joined #lisp
<pierpa_>
this works: (iter (for i :below 10) (print i)) this doesn't: (iter (:for i below 10) (print i))
<makomo>
yes, that i understood, but then they go on to mention colons explictily
Cymew has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
<makomo>
but i guess the proper term for the first "keyword" would be a "clause"?
<pierpa_>
perhaps there's a mistake in the don't loop iterate. Or perhaps they changed it after that paper was written
<makomo>
and then the rest are "keywords"
<pierpa_>
keywords, as in, in C if else switch are keywords
<pierpa_>
in the sense they're syntax
<makomo>
yup
pierpa_ is now known as pierpa
Satou has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
okflo` has quit [Remote host closed the connection]
jmercouris has joined #lisp
Folkol has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
Folkol has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Satou has quit [Quit: Cya soon guys!]
Kundry_Wag has joined #lisp
Josh_2 has joined #lisp
<Josh_2>
Evening all. So I have a large string and I want to find emails(other stuff later) is regex the best way?
dieggsy has quit [Ping timeout: 245 seconds]
Bike has quit [Ping timeout: 260 seconds]
<dim>
regexp are meant to define a "language" that you can "parse"
<dim>
they offer a very general tooling, but quite poor at times
<dim>
so, I guess the answer to your question, Josh_2, is “it depends”
<Josh_2>
Well I want to parse a webpage and extract information from it
<Josh_2>
lots and lots of webpages
BlueRavenGT has joined #lisp
<Josh_2>
Lots of simultaneous scanning
Pixel_Outlaw has quit [Remote host closed the connection]
<cess11_>
libxml2 is probably a good start, then.
scymtym has quit [Ping timeout: 255 seconds]
<cess11_>
task.h, and then some CL FFI.
<Josh_2>
I don't have time to teach myself FFI
<cess11_>
What do you have time for?
shaftoe_ has joined #lisp
<jmercouris>
I disagree libxml2 is not a good way to start
<jmercouris>
that is a preposterous notion that one needs to implement a CFFI interface to do some XML parsing
danlentz_ has joined #lisp
<jmercouris>
Shinmera has written a library for this task, can't remember the name right now
tfb_ has joined #lisp
tobel_ has joined #lisp
<jmercouris>
you can retrieve particular elements by a "jquery like" interface
<cess11_>
Not some, lots and lots of it and in parallell.
trig-ger_ has joined #lisp
<Shinmera>
Plump for parsing, and lQuery for traversing. It's not as fast as libxml2, though.
<cess11_>
An l too much, I think. But yes, it was only half serious.
<jmercouris>
if you want to do regex there is also cl:ppcre and others
Methos_ has joined #lisp
Misha_B has quit [Ping timeout: 260 seconds]
<Josh_2>
I have been playing with ppcre. Thanks :)
<Josh_2>
Seems really fast at extracting all the emails from a single page
stux|RC-only has joined #lisp
<jmercouris>
regex + email is a tricky tricky combination
<Josh_2>
Yes
eschatologist has quit [Ping timeout: 264 seconds]
<Josh_2>
0.034 seconds to parse a page with 182333 characters
<Josh_2>
The saying is something like worry about speed afterwards :P
<cess11_>
It is common that there is other valuable information close to email addresses, I would probably use something more flexible for such a use case unless some regexp hack someone else wrote is enough and all I needed was the addresses.
<cess11_>
E.g. name, title, phone.
z3t0_ has joined #lisp
<Shinmera>
Technical matters aside I'm not sure I can imagine any use case where the scraping of email addresses from thousands and thousands of pages would not be with the intention of nefarious purposes.
spaceplu- has joined #lisp
equalunique[m] has quit [*.net *.split]
jasom has quit [*.net *.split]
kumori[m] has quit [*.net *.split]
jach[m] has quit [*.net *.split]
obi-cons-cdrobi has quit [*.net *.split]
z3t0 has quit [*.net *.split]
danlentz has quit [*.net *.split]
kjeldahl has quit [*.net *.split]
tfb has quit [*.net *.split]
Meow-J_ has quit [*.net *.split]
trig-ger has quit [*.net *.split]
tobel has quit [*.net *.split]
stux|RC-- has quit [*.net *.split]
shaftoe has quit [*.net *.split]
gabot has quit [*.net *.split]
spacepluk has quit [*.net *.split]
GGMethos has quit [*.net *.split]
fe[nl]ix has quit [*.net *.split]
Blkt has quit [*.net *.split]
cpt_nemo has quit [*.net *.split]
<Josh_2>
Well It's just some generic information I want to take and I thought why not take emails ya know
tfb_ is now known as tfb
spaceplu- is now known as spacepluk
tobel_ is now known as tobel
<cess11_>
Marketing of socks targeted at oil and gas executives.
danlentz_ is now known as danlentz
jasom has joined #lisp
<Josh_2>
I gotta extract hyperlinks as well
<cess11_>
Because it might be illegal to keep them, but I'm sure you're keeping track of that.
kjeldahl has joined #lisp
gabot has joined #lisp
<Josh_2>
I had no plans on keeping anything
jach[m] has joined #lisp
rotty has joined #lisp
kumori[m] has joined #lisp
msb has quit [Ping timeout: 260 seconds]
<Josh_2>
I don't have to take emails but I have to scan for some sort of information
equalunique[m] has joined #lisp
<jmercouris>
Shinmera: there are lots of research use cases
<pierpa>
Sorry folks, while I try to not be offensive, the fact that to extract email addresses from a string one needs to interface to something thru the FFI is ludicrous. Couldn't resist.
comborico1611 has joined #lisp
hiroaki has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
zbir has quit [Ping timeout: 240 seconds]
shka_ has quit [Ping timeout: 260 seconds]
zbir has joined #lisp
drunkencoder has quit [Remote host closed the connection]
drunkencoder has joined #lisp
Mutex7 has joined #lisp
<LdBeth>
pierpa: I don’t think using FFI is a bad idea unless the intention is writing portable libraries.
<LdBeth>
Why bother yourself if life could be easier
zbir has quit [Ping timeout: 264 seconds]
<Josh_2>
With bordeaux-threads evaluating (make-thread (lambda () <my function here>)) runs the thread?
<Josh_2>
I used SBCL's built in threading library last time I did anything with threads
dyelar has quit [Quit: Leaving.]
hiroaki has joined #lisp
rumbler3_ has joined #lisp
<Josh_2>
wait maybe I need join-thread
<Josh_2>
Okay that did it
Kundry_Wag has quit [Remote host closed the connection]
bjorkintosh has joined #lisp
<pierpa>
LdBeth: really, you think searching for patterns in a string is a task which can't be done well in CL? I'm speechless.
<pierpa>
and it's not like they have to write any code, there's plenty of already written code for this.
Kundry_Wag has joined #lisp
rumbler3_ has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
<LdBeth>
pierpa: get things work is the priority. If someone is more familiar with C libs, at least it can be used as a placeholder
terpri has joined #lisp
Karl_Dscc has joined #lisp
<LdBeth>
We are not pretty print codes on texbooks, bro
fikka has quit [Read error: Connection reset by peer]
damke_ has quit [Ping timeout: 265 seconds]
<pierpa>
IF they're more familiar with C libs, IF they're familiar with the FFI. Two big IFs
damke_ has joined #lisp
<pierpa>
and I'd add IF they have lot of time to wste :)
<pierpa>
*waste
<Josh_2>
I'm not familiar with either
<pierpa>
so! :)
<Josh_2>
Don't have time to waste either
<pierpa>
then do the thing in CL
<Josh_2>
I am :)
<LdBeth>
So CL-PPCRE
<k-hos>
'do the thing' words to live by
<pierpa>
:)
<Josh_2>
DO THE THING!
<Josh_2>
am using CL-PPCRE just gotta find a really good regex, I found one that gets emails but it has a lot of false positives
<LdBeth>
I don’t believe learning PCRE would cost more than 1 hour
fikka has joined #lisp
* LdBeth
at least for me learning FFI is a lot easier than writing a YAML parser in CL
eschatologist has joined #lisp
EvW1 has quit [Remote host closed the connection]
EvW has joined #lisp
<jmercouris>
LdBeth: who said anything about YAML?
al-damiri has quit [Quit: Connection closed for inactivity]
<jackdaniel>
next configuration format I create will be named YAWN, and it will be made of good old sexp's
<dim>
I like the idea that the best configuration format is actually a programming language, as in Emacs for instance
<dim>
that said sometimes you want to avoid frigthning the users
<dim>
(frigthening?)
<LdBeth>
jmercouris: Me. I need a YAML emitter can produce block style, but existed cl-yaml is more like a JSON lib
Karl_Dscc has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 265 seconds]
Fare has quit [Ping timeout: 276 seconds]
hiroaki has joined #lisp
obi-cons-cdrobi has joined #lisp
hiroaki has quit [Ping timeout: 265 seconds]
lyding has joined #lisp
attila_lendvai has quit [Ping timeout: 260 seconds]
Pixel_Outlaw has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
MasouDa has joined #lisp
fourier has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
rumbler31 has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 265 seconds]
rumbler31 has quit [Ping timeout: 268 seconds]
jmercouris has quit [Ping timeout: 255 seconds]
damke_ has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Kaisyu has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<Josh_2>
The timeout keyword argument to Drakmas http-request doesn't seem to be doing anything, I have it set to 1. What's the easiest way to just ignore the error and continue
broccolistem has quit [Ping timeout: 264 seconds]
<Josh_2>
hmm I've actually got to return some value if I get an error
warweasle has quit [Quit: Leaving]
<theemacsshibe[m]>
anyone know of any jobs i can get involving lisp?
<theemacsshibe[m]>
preferably in melbourne australia if there's a physical location involved
Kundry_Wag has joined #lisp
ghostyyy has joined #lisp
<bjorkintosh>
theemacsshibe[m], you could work for yourself!
ghostyy has quit [Read error: Connection reset by peer]
<k-hos>
pay yourself
<theemacsshibe[m]>
i don't know what to make
<k-hos>
eventually fire yourself
<bjorkintosh>
<theemacsshibe[m]> i don't know what to make
<theemacsshibe[m]>
interesting
<bjorkintosh>
perhaps that's the first question to answer.
Kundry_Wag has quit [Ping timeout: 240 seconds]
<theemacsshibe[m]>
that is true
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<theemacsshibe[m]>
can i give myself wage cuts k-hos ?
<bjorkintosh>
ask not what lisp can do for you, ask what you can do at all with or without lisp!
<Xach>
theemacsshibe[m]: do you want to learn lisp for a job or do you know lisp and can do stuff and want to do stuff for pay?
<theemacsshibe[m]>
the latter
<Xach>
theemacsshibe[m]: do you have lisp stuff you can show off to potential employers?
<theemacsshibe[m]>
i wrote a CL ECDSA package, does that count?
<Xach>
I don't know, sorry.
<theemacsshibe[m]>
cause there wasn't one so i wrote my own, porting a python package
Patzy has quit [Ping timeout: 260 seconds]
<bjorkintosh>
theemacsshibe[m], become a consultant. convince locals with money that you have the perfect mouse trap for their mouse problem!
<LdBeth>
Or how to persuade someone to adopt Lisp
<bjorkintosh>
it's not a terribly easy problem to solve mind you.
<theemacsshibe[m]>
"you know python? lisp is like python but it doesn't suck!"
<Josh_2>
shweeeeeet managed to bypass this stupid error Q_Q
Patzy has joined #lisp
<Josh_2>
Would be nice if :connection-timeout worked tho
<bjorkintosh>
people don't have X-language problems. they have real-world problems they need solved.
<LdBeth>
Even Paul Graham started from his own business
<bjorkintosh>
doesn't matter HOW, really.
cmatei has quit [Ping timeout: 260 seconds]
<Josh_2>
just gotta show them that lisp solved problems better than everything else :)
<bjorkintosh>
theemacsshibe[m], your problem isn't lisp at that point. it's selling solutions.
pillton has joined #lisp
<theemacsshibe[m]>
that is true
<LdBeth>
Josh_2: IGNORE-ERRORS?
<bjorkintosh>
I recommend 'better off ted' and 'house of lies' for a rapid intro to biz-speak.
<Josh_2>
aww cmon
jason_m has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 246 seconds]
cmatei has joined #lisp
fikka has joined #lisp
<Josh_2>
Just got a "Unexpected Value #x20 in UTF-8 sequence" which is a Flexi-streams error, not really sure how to deal with that
<Josh_2>
Trying to download a webpage with http-request
<Josh_2>
Am getting really frustrated Q_Q
BlueRavenGT has quit [Ping timeout: 240 seconds]
python476 has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
python476 has joined #lisp
<antoszka>
Josh_2: Perhaps the HTTP body is not [properly] UTF-8 encoded and you need take that into account? Tried curling that URL and analyzing the data?
lyding has quit [Quit: WeeChat 2.1]
<Josh_2>
Well if it is going to be a repeat issue then I need to deal with the error
<Josh_2>
but for the life of me I can't understand CL error handling