My three days of AI

Friday, 13 January, Year 9 d.Tr. | Author: Mircea Popescu

I suspect this might be an interesting story, so let's tell it!

Everything started one fine Saturday early afternoon, with

mircea_popescu and entirely unrelatedly : anyone willing to stand up an irc bot for me (as a service for hire deal) and expose some kind of programmable interface that can read messages to it, process and push out a reply ? bonus points if i don't have to learn crazy-shitsticki-"$modernlanguage".
mircea_popescu kind-of has a hankering to dick around with "ai", but no time to fuck with linux eigenstates.

That happened the previous Saturday. Today is Friday, so the entire story took less than a weekii to unfold. And what a week it was indeed!

A couple of days after the above, the Right Honorable Lord Vulpes proposed the bot run Lisp. To everyone's excitement I made no protest, and so the great hope was born. In His Lordship's the Master of the Rolls's own words,

trinque will not be surprised if mircea_popescu ends up writing the ~actual AI apocalypse, now infected with the parentheses

The festivities went something as followsiii

mircea_popescu quite a cool little place you got yourself here huh.
ben_vulpes #trilema-corrugated-steel-walls

mircea_popescu hey, if i were starting #trilema i'd want it to look just like this. a few people, a coupla bots, a potted plant...
ben_vulpes skulls on the walls, orchids that look like the spawn of cthulu, dead trees...
ben_vulpes oh and this lovely iridescent purple green vine

mircea_popescu lol. you should write fantasy for eulora sometime.
ben_vulpes i'm just describing my office. oh the skull is painted black, fwiw. EVERYTHING MATCHESiv

mircea_popescu i thought it just came from a black man.
ben_vulpes humans don't have horns like that i don't think

ben_vulpes eat http://p.bvulpes.com/pastes/p31HC/?raw=true mighty_niggles
mighty_niggles ben_vulpes: http://p.bvulpes.com/pastes/aTUow/?raw=true

ben_vulpes mircea_popescu: ^^
mircea_popescu nice!

mircea_popescu your wife's a whore mighty_niggles
mighty_niggles herp diddly!

mircea_popescu your wife mighty_niggles 's a whore.
mighty_niggles herp diddly!

mircea_popescu oook this is nice!
ben_vulpes i halfway want to roll it into mimisbrunnr but...

mircea_popescu neh, ima join it to trilema eventually
ben_vulpes lmk, i can get it in there whenever

mircea_popescu yeh ima fuck a little with lisp now.
phf ben_vulpes: why the defpackage/in-package prelude?
ben_vulpes i wanted to ensure that `brain' got into the declaimed function definition in the mpbot package

mircea_popescu ben_vulpes are you available to do "natural language to lisp" translation for me or should i just stfu and read a book ?
ben_vulpes sure bub

mircea_popescu so if i want to have it say "you too
ben_vulpes (format nil "you too ~A" target)

mircea_popescu aha!
ben_vulpes nil says "return the string instead of writing it to lisp image stdout"

phf well, what i mean is that bot's brain will always live in the same package
ben_vulpes file gets written to disk and them (load ...)ed

phf o_o
ben_vulpes i know, i feel gross. what'd be better?

phf read-from-string to get the sexp. you wrap that in a handler to catch syntax etc. issues, then eval.
ben_vulpes aaah

mircea_popescu is rather grateful to phf
mircea_popescu kickass scheme we got here, 3 layer deep.
ben_vulpes managing linux eigenstates wasn't even that bad with v in the loop
phf you can wrap r-f-s and eval in the necessary combination of *readtable* and *package* binds
ben_vulpes ah, that's how you'd do it.

mircea_popescu ben_vulpes so i can't just replace quoted string with (format nil "you too ~A" target) ; why not ?
ben_vulpes change that (declare (ignore target speaker message)) to (declare (ignore target)) if you're going to start branching on speaker and message
mircea_popescu ah!

mircea_popescu ben_vulpes said you suck mighty_niggles
mighty_niggles You don't trick me, sly mircea_popescu

mircea_popescu OMFG INTELLIGENCE ARTIFICIALLY
ben_vulpes lol have fun

mircea_popescu can you tell ?
ben_vulpes i don't think anyone could mistake it

mircea_popescu ben_vulpes how do i tell it to take message and create a tree so that call(word) = message without the word ?
ben_vulpes you want to strip a word from a message?v

mircea_popescu no, i want sentence "one two three" to become (one ( (two, three), two (three)) so that sentence(one) = "two, three" and sentence(one(two)) = "three"
ben_vulpes hm

mircea_popescu and similarily for two etc.
ben_vulpes thinking

mircea_popescu i thought lisp was instantaneous. isn't that what repl means ? too quick to reply ?
ben_vulpes get outta heah

ben_vulpes phf: is there a tree-construction approach to this that doesn't boil down to ruby style dicts with string keys?
phf assocs?
phf i restarted the client, and i don't have the log on speed dial so i've no idea what the question was
mircea_popescu ok so the cannonical statement of this problem would be : how do you transform foreach i in A tree[i]

ben_vulpes i struggle to comprehend, but it may simply take time. have notepad out nao
mircea_popescu (obviously this is extremely repetitive, so ideally the struct is not evil wrt memory usage)
phf ...

phf so we have three items "one" "two" "three"
mircea_popescu initially we have a string of these. yeah. hai Framedragger
ben_vulpes hola Framedragger

phf and then you're doing a permutation?
mircea_popescu phf then for each individual item, i take all the remainder, and make them nodes ; and all the combinations of the remainder, also make individual nodes. and then for each of these node, the remainder idem

ben_vulpes i think i start to see the algo
mircea_popescu it should be easy if you know what you're doing!!1
mircea_popescu all recursion!11
mircea_popescu has nfi

ben_vulpes spoken like a true phb
mircea_popescu polyhydroxybutane ?

ben_vulpes pointy haired boss!
mircea_popescu darn

phf oh i get it
ben_vulpes mhm. cs 201 here i come

phf everyone's hiding out the storm herevi
ben_vulpes mircea_popescu: and duplicates?
mircea_popescu knock out dups. "one two three four one" = "one two three four" in this grammar

ben_vulpes how can three be a leaf of third order off of (one two) if (one two) is a leaf of first order? i (one two) also a leaf of second order off of three?
mircea_popescu let me carefully check the example. one-two intends to signify 1st order leaf is "one", 2nd order is "two". contrairwise, (one, two) intends to signify the leaf is actually "one two" as such

ben_vulpes ah
mircea_popescu i prolly should have said one->two
ben_vulpes dun think mine's right yet

mircea_popescu phf that actually seems exactly right unless i woefully misunderstand the parens. so there's 7 leaves first rank ; of these 1 has 0 subleaves ; 3 have 1 subleaf and 3 have 3 subleaves. that right ?
phf yesvii

mircea_popescu yep, winner. how did you do it ? :D
phf recursion!

mircea_popescu lol
ben_vulpes "two is 3rd order off one->three"? or is two actually 3rd order off of one->two

mircea_popescu 1st order : one ; 2nd order : two ; 3rd order : three. it's probably a three liner, too. damnit.
phf http://p.bvulpes.com/pastes/VqDC2/?raw=true
phf that's a naive version though

mircea_popescu so defun subsets introduces a function ?
phf yeap

mircea_popescu (split-sequence:split-sequence #\space s :remove-empty-subseqs t)
ben_vulpes remove-duplicates

mircea_popescu ben_vulpes aha.
ben_vulpes (not for chars)

phf well, no, first it splits it on whitespace, then it removes duplicates
mircea_popescu but i want it first to nuke non-alpha, then split it, then remove.
ben_vulpes i'm out for a bit

mircea_popescu laters ben_vulpes
ben_vulpes neat puzzle. will refrain from answer guide for now.

mircea_popescu i'd gladly read alt implementation for my own culture. this adventure has increased the total lisp code i ever read by a hefty %
mircea_popescu phf and what's remove-if (lambda (a) (member a sub)) items))) do ?
phf so you have a list, items. plain remove as a first argument takes what you want to remove (remove a (a b a c)) -> (b c)

mircea_popescu aha
phf but in this case we want to remove things conditionally. for each item in the list "items" we want to remove an item if it's a member of "sub" list.

mircea_popescu we do.
phf so (lambda (...) ...) introduces an anonymous function

mircea_popescu which returns true if a is in sub ?
phf yeap. (lambda (a) (member a sub)) is (member a sub) waiting for execution. (member element list) in turn return "true" if element's in the list.

mircea_popescu or wait. lambda (a) (a) returns a if a = a ?
phf yes. (lambda (a) a) is an identity function (there's also a standard equivalent called "identity")

mircea_popescu so to verbalize this, remove-if (lambda (a) (member a sub)) items))) means, remove from items element x defined as whatever lambda thinks x and "member x sub" means ?
mircea_popescu lol check it out, even the verbalisation demands parens
mircea_popescu so to verbalize this, remove-if (lambda (a) (member a sub)) items))) means, remove from items element x defined as whatever lambda thinks (x "member x sub") means ?
phf hmm, pretty close

mircea_popescu what did i miss ?
phf lambda decides what "(x) (member x sub)" means during compilation. it returns a thing (a higher order function). that higher order function is what's making the decisions. remove looks at each item and compares it with first argument. remove-if looks at each item and for each item asks its first argument to make decision

mircea_popescu aha. ok, i might have a clue as to how this works, maybe. now, if i wanted to associate a number with each node, would it go into this struct or should i make a separate struct ?
phf i mean subsets is pretty straightforward, and maps to a concept. (subsets '(1 2 3)) -> (NIL (3) (2) (2 3) (1) (1 3) (1 2) (1 2 3)). so the bulk of specific complexity sits in "tree-thingy".

mircea_popescu right. hm i thought tree-tingy was a function.
phf right, it is. i mean bulk of problem's complexity is in the code of tree-thingy.

mircea_popescu ah yes.
phf but yeah, so re "separate structure" it's usually just a question of optimization. you could add numbering to tree-thingy and if you're generating a gigantic tree that might be a better option.

mircea_popescu it looks like it would be pretty large yes. but more from a laziness pov, i'd prefer to use the easiest reference model :)
phf right, from didactic perspective (and also how i would've approach this problem by default) is to have a separate tree walker that takes the result of tree-thingy and produces a new tree, which has all the nodes numbered. it's probably another 5-7 line function.

mircea_popescu i don't want them numbered, i want a number added so i can give the nodes weight. i guess it's what you meant.
phf oh oh. e're on the same page here.

mircea_popescu so as to go from ( ("one" "two" "three"))) to ( ("one" "two" "three") (0.556))) or such. is that even correct notation ?
phf so it's a little bit tricky because lisp list processing at the bedrock operates on "cons cells" rather than lists, and in code i'm mixing and matching them. sometimes a structure of many cons cells is a valid list, but sometimes not

mircea_popescu hm. and for that matter, how do i use references ? suppose i want to find the content of the leaf off one->three. how do i say tree(one(three)) ?
phf (cons "a" (cons "b" (cons "c" nil))) -> ("a" "b" "c"). likewise (cons "a" (list "b" "c")) -> ("a" "b" "c").

mircea_popescu so (cons "a" (cons "b")) would return ("c") ?
phf no no cons is for building things.

mircea_popescu ah yes. but i want to get the specific leaf from the tree now. or i'm sorry, am i interrupting ?
phf i'm trying to decide if the whole cons/list thing is worth fully driving home at the moment :)

mircea_popescu alrighty, go ahead :)
phf cons is a building block, basically, that is often used to produce valid lists. but in order to navigate the result you have to visualize what the cons structure looks like

mircea_popescu right
phf there are functions for navigating a cons structure. so in order to actually reference stuff you basically need to grok what the result of "tree-thingy" looks like, and then produce an appropriate combination of referencing calls

mircea_popescu so if i had the tree from above and i wanted to get one->two->three.content and one->two.weight, i'd be writing my own function rather than using some sort of referencing scheme ?
phf pretty much

mircea_popescu tsk. so how do i say "return a list of all nudes hanging from a node called "two three"" ?
mircea_popescu uh... nodes. obviously.
phf :D

mircea_popescu but ideally as a list, or w/e, an iterable array, or what's it called. something i can go a[iterator] over
phf (defun string-set-equal (a b) (and (subsetp a b :test 'string-equal) (subsetp b a :test 'string-equal)))
phf (defun get-node (node tree) (assoc node tree :test 'string-set-equal))

mircea_popescu so as to the first : define a function called "string-set-equal" to take two parameters and to return uh... to return the intersection of checking if a b or b a are string-equal to test ?
phf heh, so the more code the more complexity :) you can kind of stick to the basic set of concepts, but at some point it just becomes impractical

mircea_popescu my interest is mostly in terms of getting this notion on paper.
phf string-set-equal takes two lists-of-strings and checks if they are the same, ignoring the order

mircea_popescu ok. so defun isn't followed by the name of the item defined necessarily ?
phf it is. what was an explanation of what my defined function does

mircea_popescu oh i thought you meant above "is" as in, language primitive. like "for". i guess my very imperative reading style isn'rt adequate for lisp huh. carry on!
phf well, lisp has very few language primitives. there's something like 10, and of the ones that is in the code only if and let are primitives.

mircea_popescu aha. and lambda ?
phf right :) it's a primitive in LISP (and scheme) and for all practical purposes it is in common lisp to, but technically in common lisp specifically it's not a special operator

mircea_popescu ah. k.
phf but yeah, so (subsetp a b) checks if a is a subset of b, e.g. (1 2 3) (1 2 3 4) -> t

mircea_popescu ah it returns true rather than the subset. ok.
phf if a is a subset of b and b is a subset of a, then both are equal. :test 'string-equal is a clarification that equality should be tested in a more precise way. specifically i'm trying to see if strings inside that list are equal ignoring the case differences. (string-equal "ABC" "abc") -> t

mircea_popescu ah darn, this also doesn't belong here. so ideally i want to transform the message string prior to all this processing : all lowercase, nothing but alphabetic chars and space. then we can make strong assumptions here that you don't need that, making the code simpler.
phf ah, there's actually a way

mircea_popescu a string isn't a list of characters i don't expect ?
phf yeah.. it's an ~array~ of characters

mircea_popescu uh
phf the distinction is there because von neumann

mircea_popescu wait lisp has arrays ? so epic, how do i say for i 1 to size of message if message[i] not in [a..z ] delete it ? (to my mind, if it wasn't obvious, an array is a list with item counter)
phf that actually goes back to a thread long time agoviii

mircea_popescu aha
phf on von neumann machines array/list is an artifact of memory management.

mircea_popescu yeah. hence why i say counter, the assumption being there's nothing between 2 and 3. anyway, so if message = "hurr" can i say message[2] and does it yield u or r ?
phf array is preallocated memory region, that you can reference into at constant time, but can't resize. a list is a growable structure, that can't reference into at constant time, but can "resize". lisp does the same count from 0 thing, so #\r. it'll be something like (elt "hurr" 2) -> #\r

mircea_popescu whjat's #\r ? don't tell me # is alphanum and \r is space
phf that's how lisp prints and reads individual characters in code

mircea_popescu is this bulky as fuck ? what's the cannonical way to constrain the message space through deletion ?
phf it's the same number of characters total as C, 'r'. but anyway, to finally get back to the point :D i've no idea about canonical, but if i were to do it, i will convert string to list, filter it using list filtering procedures and then convert it back

mircea_popescu why would you convert it to list ?! why not iterate through array, and if element fits our bill push it into a list ? (and in passing let it be said i am profoundly worried about a language space that doesn't have a cannonical way to take a message M made out of elements in A and transform it into M' made out of elements in A')
phf that actually works too, it's not necessarily cheaper though

mircea_popescu how could it be cheaper to transform toi list too ? does compiler optimize the shit out of what we tell it anyway ?
phf i didn't say it's cheaper, i said that it's not necessarily too expensive :}

mircea_popescu you said it's not necessarily cheaper, that means the other could be cheaper!
phf that's fair

mircea_popescu minor point. so how do i iterate through array a, and if item is in set push it into list b ?
phf actually, i'm being all over the place. so if specifically we want to remove characters out of a string, it'll be something like (remove-if-not (lambda (a) (find a "abcdef")) "abc, xyz, def") which will return "abce"

mircea_popescu and i enumerate the alphabet there ?
phf yeap

mircea_popescu do you have ANY IDEA how fucking juvenile this is ?
phf explain

mircea_popescu ima list the alphabet ? bejaysus.

mircea_popescu hurr mighty_niggles ?
mighty_niggles You don't trick me, sly mircea_popescu

mircea_popescu well that didn't work.
ben_vulpes read the error message. too many arguments to format. ~A is an "ascii" directive in format strings

mircea_popescu o hai thar.
ben_vulpes i'm still not here, cracked the laptop in the car for other reasons.

mircea_popescu i thought it meant something a la awk, "1st var"
ben_vulpes no.

mircea_popescu a ok
ben_vulpes you can do "~{~A ~}" which will print elements of a list. okay bye for real
phf haha, let's add more complexity :)

mircea_popescu durr mighty_niggles ...,55
mighty_niggles You don't trick me, sly

mircea_popescu totally.
phf hehe, ok, so what are you trying to do?

mircea_popescu i am trying to have it return "You don't trick me, sly mircea_popescu with your durr lures!""
phf (format nil "You don't trick me, sly ~A with your ~A lures!" (remove-if-not (lambda (a) (find a ""abcdefghijklmnopqrstuvwxyz")) message))

mircea_popescu wowza hm
phf format doesn't do any concatenation

mircea_popescu aha!
mircea_popescu shit it broke
mircea_popescu ben_vulpes MAH TOY!
phf mircea_popescu: need to close that parenthesis

mircea_popescu oh
phf like line with (format ...) is missing a closing parenthesis

mircea_popescu lies
mircea_popescu dude it's 5 for 5
mircea_popescu am i blind ?
phf (defun brain (target speaker message) (format nil "You don't trick me, sly ~A with your ~A lures!" (remove-if-not (lambda (a) (find a "abcdefghijklmnopqrstuvwxyz")) message)))
phf ffs
phf (defun brain (target speaker message) (format nil "You don't trick me, sly ~A with your ~A lures!" target (remove-if-not (lambda (a) (find a "abcdefghijklmnopqrstuvwxyz")) message)))
phf or wait speaker?
phf (defun brain (target speaker message) (format nil "You don't trick me, sly ~A with your ~A lures!" speaker (remove-if-not (lambda (a) (find a "abcdefghijklmnopqrstuvwxyz")) message)))

mircea_popescu sly speakler wioth your message lures
mircea_popescu hurr,durr&purr mighty_niggles !!2
phf mighty_niggles: poop
mighty_niggles You don't trick me, sly phf with your poop lures!
mighty_niggles You don't trick me, sly mircea_popescu with your mightyniggles lures!

mircea_popescu aaahahaha
phf i think it needs an option to submit something over a message

mircea_popescu dude... that poop lures thing qualifies as ai. srsly now.
phf i kind of want to wire a lisp repl to a bot now

mircea_popescu o wait, YOU said poop to him. fuck, i totally missed your line, thought he's talking to mine
phf :D

mircea_popescu phf by all means, use this one! ima go eat, have funs. kinda why i had it designed like this anyway
phf mighty_niggles: http://phuctor.nosuchlabs.com/gpgkey/9D9985B30D9AAB76E7745F5A8E4199ADE47CC67D29671B15398C9B83BF0F023E
mighty_niggles You don't trick me, sly phf with your httpphuctornosuchlabscomgpgkey ecent huctorings huctored divides oduli belonging to sshrsa key from une extraction for huctor import sk asciilifeform or framedragger on reenode or email fd at mkj dot lt sshlt nknown lures!

phf oh does it take it up from anyone in wot? :o
mircea_popescu anyone at all, what.

phf mighty_niggles: http://p.bvulpes.com/pastes/aCKdt/?raw=true
mighty_niggles You don't trick me, sly phf with your httppbvulpescompastesadtrawtrue lures!

mircea_popescu ima change that once i move it to trilema, but until then... and besides, you can have it cloned im sure.
mighty_niggles phf: that knob's not for you.

mircea_popescu ew. i'll convey.
phf oh it's your own thing, i was trying to see if it works

mircea_popescu apparently not. truth be told it wasn't specified either way. anyway, i'll be back in a half hour or so.
phf wait, one sec.

mircea_popescu aite
phf (+ 2 2)
phf mighty_niggles: (+ 2 2)
mighty_niggles #<SB-INT:SIMPLE-READER-ERROR "illegal terminating character after a colon: ~S" {100500D9A3}>
phf :/

mircea_popescu YOU ARE NOT GOOD AT THIS
mircea_popescu tell him mighty_niggles
phf nope
phf mighty_niggles (+ 2 2)
mighty_niggles 4

mircea_popescu uh
phf mighty_niggles (concatenate 'string "i'm in your machines" "running your codes")
mighty_niggles "i'm in your machinesrunning your codes"

mircea_popescu mighty_niggles ($ 2 5)
phf wait, i can patch it up
phf mighty_niggles *package*
mighty_niggles #<PACKAGE "COMMON-LISP-USER">

mircea_popescu lmao haxxt!
phf mighty_niggles (expt 2 1024)
mighty_niggles 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624224137216

mircea_popescu mighty_niggles (expt 2 1/1024)
phf wait, i got a fix in a second

mircea_popescu dun fret phf, girls waiting for me.
phf haha, that's a better way to spend time
phf laters

mircea_popescu no srsly, do whatever, im in no rush

phf mighty_niggles (let ( (*package* (find-package :mpbot))) (read-from-string "(defun brain (target speaker message) (cond ( (member speaker '(\"phf\" \"mircea_popescu\") :test #'string-equal) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e))))))"))
mighty_niggles (DEFUN MPBOT::BRAIN (MPBOT::TARGET MPBOT::SPEAKER MPBOT::MESSAGE)

mircea_popescu this sorcery
phf that's not what ... hmm
phf mircea_popescu: try saying things to it

mircea_popescu hi mighty_niggles
mircea_popescu mighty_niggles (let ( (*package* (find-package :mpbot))) (read-from-string "(defun brain (target speaker message) (cond ( (member speaker '(\"phf\" \"mircea_popescu\") :test #'string-equal) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e))))))")) and also, urmom,
phf hmm

mircea_popescu mighty_niggles (expt 1024 2)
phf mircea_popescu 2
phf err
phf mighty_niggles 2
mighty_niggles 2

mircea_popescu well now it won't talk to me!
mircea_popescu you hijinxt my bot ? THAT I PAID FOR ?
mircea_popescu phf 2
phf 2

mircea_popescu ahahaha
mircea_popescu phf 2 mighty_niggles 3 hurr durr!
phf mighty_niggles (find-package :mpbot)
mighty_niggles #<PACKAGE "MPBOT">

mircea_popescu mighty_niggles 2
phf mighty_niggles (read-from-string "(+ 2 2)")
mighty_niggles (+ 2 2)
phf i'm tyring to figure out how to patch it from repl

mircea_popescu mah lunch stoled. phf i am aware, just poking fun from the side
mircea_popescu hurr33durr mighty_niggles
mighty_niggles #<UNBOUND-VARIABLE HTY_NIGGLES {10043D6313}>
phf should now listen

mircea_popescu 2 mighty_niggles
mighty_niggles #<UNBOUND-VARIABLE ES {10055FE5E3}>
phf the parser is dodgy

mircea_popescu hm.
phf it basically has to start with mighty_niggles
mighty_niggles #<UNBOUND-VARIABLE AS {1003BBBF23}>

mircea_popescu mighty_niggles 2
mighty_niggles 2

mircea_popescu mighty_niggles hurrdurr
mighty_niggles #<UNBOUND-VARIABLE HURRDURR {1007B26313}>

mircea_popescu mighty_niggles hurrd44urr
mighty_niggles #<UNBOUND-VARIABLE HURRD44URR {1008C56313}>
phf mighty_niggles (setq hurrdurr 123)
mighty_niggles 123

mircea_popescu mighty_niggles "hurrd44urr"
phf mighty_niggles hurrdurr
mighty_niggles 123
mighty_niggles "hurrd44urr"
phf man i hope it's not running inside ben_vulpes's production machine..

mircea_popescu lol. i dunno if you were here / saw log, but originally he had it with name at start then i asked for namwe anywhere which he spot-fixed. but maybe a little brokenly.
phf aah. it should probably just give raw message, but it removes a chunk from the beginning.

mircea_popescu aha. anyway, we reconvene after ben_vulpes has had a chance to fix it ?
phf kk

mircea_popescu and tyvm phf
phf you're welcome
phf mighty_niggles (drakma:http-request "https://www.google.com")
mighty_niggles "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"nl\"><head><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"><meta content=\"/images/branding/googleg/1x/googleg_standard_color_128dp.png\" itemprop=\"image\"><title>Google</title><script>(function(){window.google={kEI:'_Kt1WJOFO4PJsQHpkImIDg',kEXPI:'18168,1351903,1352174,1352218,1352297,3700274,3700347,4029815,4032678,4038012,4043492,4045841,
phf mighty_niggles (sb-debug:list-backtrace)
mighty_niggles ( (SB-INT:SIMPLE-EVAL-IN-LEXENV (LIST-BACKTRACE) #<NULL-LEXENV>)

phf ...

phf slowly walks away
ben_vulpes occasional restarts they said. little bit of hand holding they said.
phf oh hey ben. we had a bit of an accident here
ben_vulpes accident? i don't see much that looks accidental
phf ._.
ben_vulpes good grief you two are abusive

ben_vulpes http://logs.bvulpes.com/chainstate#348
ben_vulpes http://logs.bvulpes.com/chainstate#423
ben_vulpes parser is hella dodgy. was far less dodgy before i had to eat highlights anywhere

mircea_popescu ben_vulpes your highlight dun work correctly (i think it does next line ?) and meh!!!
mircea_popescu i dunno about you, but I certainly had a lot of fun. moreover, i must point out the bot was defective!

ben_vulpes it's evaling code from mircea_popescu, i don't know that there's an fective to be be'd. over the wire. with phf helping. to clarify on 'meh'?

mircea_popescu don't worry about that part. the only point of concern is where it was eating x characters from the start. obv you're not expected to secure a lisp environment in the absolute sense.
ben_vulpes oh and would you look at that fuckin freenode failed to deliver the reg mail to my mailhole. and they require emails for registration.

mircea_popescu but i do want it to return line minus its name every time its name is contained in a chatline. oh and also, i'd like it to be named something a lot sluttier. candi_lustt ?
ben_vulpes sure.

mircea_popescu yay
ben_vulpes you want it in #t?

mircea_popescu alright. it can also wait until i actually get v1 of what i want on it. which isn't quite there yet.
ben_vulpes aight, i'll hold off then

mircea_popescu makes for a tight "practical lisp learnin'" chatlog anyway. besides, we learned phf can't be trusted with secure code!
ben_vulpes bbl
phf https://www.youtube.com/watch?v=BZBLt_rcehE

mircea_popescu im not clicking that.
ben_vulpes OMFG THE NICKSERV HELL
mircea_popescu ;/

candi_lustt has joined #chainstate
phf candi_lustt 2
phf :(

mircea_popescu candi_lustt 2
phf strange, it picked up ~something~

mircea_popescu candi_lustt how many 2's am i fingering up
phf test candi_lustt
ben_vulpes standby. it's not going to say anything until it gets voice. y'all are clogging the outbox and it has no rate limiter
candi_lustt 2
candi_lustt #<UNBOUND-VARIABLE HOW {100388CE73}>
candi_lustt #<UNBOUND-VARIABLE LUSTT {10073C6283}>
phf right on
phf candi_lustt (format t "this is test~%")
candi_lustt NIL

mircea_popescu claps from the side
ben_vulpes i'm going to go eat dinner, yr on your own for crashes for a few hours
phf candi_lustt '(1 2 3)
candi_lustt (1 2 3)
BingoBoingo Oh my what a bot
phf i'm confused what's up with the newlines in lists?ix

mircea_popescu BingoBoingo it's not a bot it's a booty
phf candi_lustt (format nil "this is~% test~%")
BingoBoingo Oh a butt!
candi_lustt "this is
ben_vulpes phf: queue questions i'll be back
phf kk
BingoBoingo candi_lustt: Who is your daddy and what does he do?
phf candi_lustt (loop for i from 1 to 20 collect i)
candi_lustt (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
phf candi_lustt (loop for i from 1 to 20 collect :this-is-test-hello-world)
candi_lustt (:THIS-IS-TEST-HELLO-WORLD :THIS-IS-TEST-HELLO-WORLD :THIS-IS-TEST-HELLO-WORLD

mircea_popescu BingoBoingo it's my ai bot, but currently half her head is in ben_vulpes 's soup bowl and phf insists on doing things with her arms
BingoBoingo I figured as much, just wondering how much unnatural language it's grasped
BingoBoingo *she's grasped

mircea_popescu 0, it doesn't even have the skull screwed on yet.
phf ooh

mircea_popescu it's currently screwed off.
BingoBoingo candi_lustt (Who is your daddy and what does he do?)
phf BingoBoingo: it's hard coded to myself and mircea_popescu
BingoBoingo Ah ic
BingoBoingo phf (candilustt (who is your daddy and what does he do))
phf candi_lustt (progn (eval (read-from-string (drakma:http-request "http://faculty.hampshire.edu/lspector/courses/eliza-simple.lisp"))) (values))
candi_lustt NIL
phf candi_lustt (use-eliza-rules '(|my| |name| |is| |phf|)
candi_lustt #<END-OF-FILE {1008505A53}>
phf candi_lustt (use-eliza-rules '(|my| |name| |is| |phf|))
candi_lustt #<UNDEFINED-FUNCTION USE-ELIZA-RULES {10057CDB93}>
phf hmm
phf candi_lustt #'eliza
candi_lustt #<UNDEFINED-FUNCTION ELIZA {1007F659D3}>
phf odd

mircea_popescu so ben_vulpes im afraid i might've been less than helpful. what i want it to do is : 1) candi_lustt eat
candi_lustt mircea_popescu: fetch failed. details: http://p.bvulpes.com/pastes/qyBng/?raw=true

mircea_popescu no need for it to "parse everywhere" in the sense of interpreting eat url candi_lustt or such nonsense.
candi_lustt mircea_popescu: fetch failed. details: http://p.bvulpes.com/pastes/AyU86/?raw=true
phf candi_lustt #'mpbot::brain
candi_lustt #<FUNCTION MPBOT::BRAIN>

mircea_popescu once that's there we can continue with the cleaning up of the line and the constructs from before.
BingoBoingo So when is candi_lustt eating the Indian_candi chat lines?
candi_lustt BingoBoingo: that knob's not for you.
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e))))))
candi_lustt MPBOT::BRAIN
phf candi_lustt still operational?
candi_lustt #<UNBOUND-VARIABLE STILL {10083A6323}>
BingoBoingo lol
phf candi_lustt (defun trim (s length) (if (> (length s) length) (subseq s 0 length) s))
candi_lustt TRIM
phf candi_lustt (trim "abcdef" 3)
candi_lustt "abc"
phf candi_lustt (trim "abcdef" 300)
candi_lustt "abcdef"
phf candi_lustt (defconstant +max-irc-length+ 510)
candi_lustt +MAX-IRC-LENGTH+
mimisbrunnr block 447602: 1`361 txns, 998`154 bytes
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e))) +max-irc-length+))))
candi_lustt MPBOT::BRAIN
phf i'm still not quite sure why it floods out though

mircea_popescu gotta wait 1 s between lines
phf but brain should only ever return one line

mircea_popescu possibly returned multiple lines with that trace thing
phf candi_lustt (drakma:http-request "http://faculty.hampshire.edu/lspector/courses/eliza-simple.lisp")
candi_lustt ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
phf candi_lustt (setq eliza-source (drakma:http-request "http://faculty.hampshire.edu/lspector/courses/eliza-simple.lisp"))
candi_lustt ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
phf candi_lustt (first (read-from-string eliza-source))
candi_lustt DEFCONSTANT
phf candi_lustt (first (concatenate 'string "(progn " (read-from-string eliza-source) ")")
candi_lustt #<END-OF-FILE {100506DCF3}>
phf candi_lustt (first (concatenate 'string "(progn " (read-from-string eliza-source) ")"))
candi_lustt #<TYPE-ERROR expected-type: "CHARACTER"datum: DEFCONSTANT>
phf candi_lustt (first (read-from-string (concatenate 'string "(progn " eliza-source ")")))
candi_lustt PROGN
phf candi_lustt (eval (read-from-string (concatenate 'string "(progn " eliza-source ")")))
candi_lustt NIL
phf candi_lustt (use-eliza-rules '(|my| |name| |is| |phf|))
candi_lustt (DO YOU FEEL STRONGLY ABOUT DISCUSSING SUCH THINGS?)
phf candi_lustt (use-eliza-rules '(my name is phf))
candi_lustt (I AM NOT INTERESTED IN NAMES)
phf :}

mircea_popescu heh.
phf candi_lustt (use-eliza-rules '(i feel like this is working))
candi_lustt (DO YOU OFTEN FEEL (LIKE THIS IS WORKING) ?)

mircea_popescu candi_lustt (use-eliza-rules '(candi_lustt (use-eliza-rules '(i feel like this is working))))
candi_lustt (PLEASE CONTINUE)
phf candi_lustt *eliza-rules*
candi_lustt ( ( ( ?*X HELLO ?*Y) (HOW DO YOU DO. PLEASE STATE YOUR PROBLEM.))
phf candi_lustt (mapcar 'car *eliza-rules*)
candi_lustt ( (?*X HELLO ?*Y) (?*X COMPUTER ?*Y) (?*X NAME ?*Y) (?*X SORRY ?*Y)
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (let ( (*print-pretty* nil)) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e))))) +max-irc-length+)))
candi_lustt MPBOT::BRAIN
phf candi_lustt (mapcar 'car *eliza-rules*)
candi_lustt phf: error, see: http://p.bvulpes.com/pastes/CwYXa/?raw=true
phf oh hmm
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (let ( (*print-pretty* nil)) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e)))) +max-irc-length+))))
candi_lustt phf: error, see: http://p.bvulpes.com/pastes/BhtYa/?raw=true
phf mircea_popescu: http://p.bvulpes.com/pastes/3ruB3/?raw=true can you please do the honors of reseting the brain

mircea_popescu seat http://p.bvulpes.com/pastes/3ruB3/?raw=true candi_lustt
candi_lustt mircea_popescu: http://p.bvulpes.com/pastes/DTuGV/?raw=true
phf candi_lustt (mapcar 'car *eliza-rules*)
candi_lustt ( (?*X HELLO ?*Y) (?*X COMPUTER ?*Y) (?*X NAME ?*Y) (?*X SORRY ?*Y) (?*X I REMEMBER ?*Y) (?*X DO YOU REMEMBER ?*Y) (?*X IF ?*Y) (?*X I DREAMT ?*Y) (?*X DREAM ABOUT ?*Y) (?*X DREAM ?*Y) (?*X MY MOTHER ?*Y) (?*X MY FATHER ?*Y) (?*X I WANT ?*Y) (?*X I AM GLAD ?*Y) (?*X I AM SAD ?*Y) (?*X ARE LIKE ?*Y) (?*X IS LIKE ?*Y) (?*X ALIKE ?*Y) (?*X SAME ?*Y) (?*X I WAS ?*Y) (?*X WAS I ?*Y) (?*X I AM ?*Y) (?*X AM I ?*Y) (?*X AM ?*Y) (?*X ARE YOU ?*Y) (?*X YOU AR
mimisbrunnr block 447603: 2`651 txns, 998`185 bytes
phf candi_lustt (defun elizas (s) (with-input-from-string (*standard-input* s) (with-output-to-string (*standard-output*) (print-with-spaces (flatten (use-eliza-rules (read-line-no-punct)))))))
candi_lustt ELIZAS
phf candi_lustt (elizas "hello, bot")
candi_lustt "HOW DO YOU DO. PLEASE STATE YOUR PROBLEM. "
phf candi_lustt (use-package :alexandria)
candi_lustt #<NAME-CONFLICT {1004D5DE23}>
ben_vulpes fuck, buddy.
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (alexandria:starts-with #\: message) (elizas (subseq message 1))) ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (let ( (*print-pretty* nil)) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e)))) 510))))
candi_lustt MPBOT::BRAIN
phf candi_lustt: hello, how are you
candi_lustt HOW DO YOU DO. PLEASE STATE YOUR PROBLEM.
phf candi_lustt (+ 2 2)
candi_lustt 4
phf candi_lustt: why are you always such a cunt
candi_lustt WOULD YOU PREFER IF I WEREN QUOTE T ALWAYS SUCH A CUNT
phf hmm
phf candi_lustt: why don't you go fuck yourself
candi_lustt phf: error, see: http://p.bvulpes.com/pastes/1bJqj/?raw=true
phf this eliza code is not very good :/
ben_vulpes phf: because i am a sick sick man you have access to quicklisp
phf oh i figured as much
ben_vulpes cuz no expedient way around it
phf candi_lustt #'ql:quickload
candi_lustt #<STANDARD-GENERIC-FUNCTION QUICKLISP-CLIENT:QUICKLOAD (2)>
phf candi_lustt (find-package :hunchentoot)
candi_lustt NIL
ben_vulpes hahaha
ben_vulpes uhuh
phf tune in tomorrow, when phf live codes btcbase clone over an irc chat line
ben_vulpes you know i was considering putting it in an amazon lambda with all of quicklisp compiled in
ben_vulpes phf: lzozlozlz
ben_vulpes but i think all of this state crufting up is excellent
phf candi_lustt: i want a cookie
candi_lustt WHAT WOULD IT MEAN IF YOU GOT A COOKIE

mircea_popescu well tomorro i think shall wipe all this crud. no idea why eliza got imported anyway ?
ben_vulpes because we can! therefore we must!

mircea_popescu heh
ben_vulpes i'll get the trimming and such in place tomorrow

mircea_popescu works.
phf none of this resides anywhere, except in the bots memory. as soon as ben_vulpes restarts it, it's going to be clean slate

mircea_popescu yeh.
ben_vulpes phf: no i can restart the bot and preserve all of this. gotta leave the lisp image running though

mircea_popescu speaking of which ben_vulpes : as my tree will grow, which it will, it'd be a pity if it got lost. is there some way to backup state ?
ben_vulpes yeah, we can get there

mircea_popescu cool.
ben_vulpes serialize vars to disk is not hard, perhaps phf will share some secrets of btcbase
mimisbrunnr block 447604: 2`540 txns, 998`039 bytes
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (alexandria:starts-with #\: message) (elizas (subseq message 1))) ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (let ( (*print-pretty* nil)) (handler-case (eval (read-from-string message)) (error (e) (prin1-to-string e)))) 510))))
candi_lustt MPBOT::BRAIN
phf candi_lustt (+ 2 2)
candi_lustt phf: error, see: http://p.bvulpes.com/pastes/ZHHUI/?raw=true
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (alexandria:starts-with #\: message) (elizas (subseq message 1))) ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (let ( (*print-pretty* nil)) (handler-case (princ-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e)))) 510))))
candi_lustt phf: error, see: http://p.bvulpes.com/pastes/HtPVF/?raw=true
phf candi_lustt (+ 2 2)
candi_lustt 4
phf candi_lustt (format nil "a~%b")
candi_lustt a
phf candi_lustt (defun mpbot::brain (target speaker message) (cond ( (alexandria:starts-with #\: message) (elizas (subseq message 1))) ( (member speaker '("phf" "mircea_popescu") :test #'string-equal) (trim (let ( (*print-pretty* nil)) (handler-case (prin1-to-string (eval (read-from-string message))) (error (e) (prin1-to-string e)))) 510))))
candi_lustt BRAIN
ben_vulpes i have made a cascadian phf trap
phf dat repl

mircea_popescu lol
phf candi_lustt ircbot::*bot*
candi_lustt #<UNBOUND-VARIABLE *BOT* {1007A562E3}>
phf candi_lustt (find-package :ircbot)
candi_lustt #<PACKAGE "IRCBOT">

mimisbrunnr block 447605: 2`338 txns, 998`207 bytes
phf candi_lustt (Loop for a being each present-symbol in :ircbot collect a)
candi_lustt (IRCBOT::IRCBOT-NICKSERV-AUTH IRCBOT::*PING-FREQ* IRCBOT::*BOT* IRCBOT::IRCBOT-NICKSERV-GHOST IRCBOT::BOT IRCBOT::IRCBOT-PASSWORD IRCBOT::MESSAGE-TEXT IRCBOT::CONN IRCBOT::THREADED-P IRCBOT::LAG IRCBOT::IRCBOT-RANDOMIZE-NICK IRCBOT::FOR IRCBOT::RUN-THREAD IRCBOT::IRCBOT-HANDLE-NICKSERV IRCBOT::PORT IRCBOT::WITH IRCBOT::QUIT-MSG IRCBOT::IN IRCBOT::IRCBOT-RUN-THREAD IRCBOT::CONNECTION-SECURITY IRCBOT::IRCBOT-PING-THREAD IRCBOT::IRCBOT-START-PING-THRE

mircea_popescu really, it's not clear to me there's any other purpose for computers.
mimisbrunnr block 447606: 758 txns, 886`570 bytes
phf candi_lustt mpbot::*connection*
candi_lustt #<UNBOUND-VARIABLE *CONNECTION* {1007A06323}>
phf candi_lustt mpbot::*bot*
candi_lustt #<LOGBOT:LOGBOT {1009218413}>
phf candi_lustt (ircbot:ircbot-send-message mpbot::*bot* "#chainstate" "hello, world")
candi_lustt hello, world
candi_lustt "PRIVMSG #chainstate :hello, world
phf candi_lustt (defun say (s) (ircbot:ircbot-send-message mpbot::*bot* "#chainstate" s) (values))
candi_lustt SAY
phf candi_lustt (progn (say "this") (sleep 1) (say "is") (sleep 1) (say "test"))
candi_lustt this
candi_lustt is
candi_lustt test
candi_lustt NIL
mimisbrunnr block 447607: 2`157 txns, 998`094 bytes
phf candi_lustt (loop for y from -1 to 1 by 1/15 do (progn (say (coerce (loop for x from -2 to 1 by .04 collect (let* ( (c 126) (z (complex x y)) (a z)) (loop while (< (abs (setq z (+ (* z z) a))) 2) while (> (decf c) 32)) (code-char c))) 'string)) (sleep 1)))
candi_lustt ~~~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}||||||||{{{zyvrwum{|||||}}}}}}~~~~~~~~~~~~~
candi_lustt ~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{zyxvptwyz{{|||||}}}}}}~~~~~~~~~~~
candi_lustt ~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{{zwLtb huwx{{{{||||}}}}}}}~~~~~~~~~
candi_lustt ~~~~~~~~}}}}}}}}}}}}}}}}}}}|||||||||{{zzzyxvn Knwyz{{{{||||}}}}}}~~~~~~~~
candi_lustt ~~~~~~~}}}}}}}}}}}}}}}}}}||||||||{{zzzzyyywuk qwxyzzzz{{|||}}}}}}~~~~~~~
candi_lustt ~~~~~}}}}}}}}}}}}}}}}}}|||||||{{{zxjnpwwtjsqpi lqrujnxyyxrz{|}}}}}}}}~~~~~
candi_lustt ~~~~}}}}}}}}}}}}}}}}}|||||{{{{{zzzxt> qf pttfqeqz{|}}}}}}}}~~~~
candi_lustt ~~~~}}}}}}}}}}}}}}}|||{{{{{{{{zzzxwup sxz{||}}}}}}}~~~~
candi_lustt ~~~}}}}}}}}}}}}|||{z{{{{{{{zzzzywkmo rwyz{{||}}}}}}}~~~
candi_lustt ~~}}}}}}}}}||||{{zwvyyyyyyyyyyyxvsP swvz{||}}}}}}}}~~
candi_lustt ~~}}}}|||||||{{{zzwrtsww^uwwxxwvr iz{|||}}}}}}}~~
candi_lustt ~}}}|||||||{{{{{zyxws mj Ubhuutl sxz{|||}}}}}}}}~
candi_lustt ~}||||||||{{{{{zyytun qq avz{|||}}}}}}}}~
candi_lustt ~|||||||{{zzzyxsvvum j Sz{{|||}}}}}}}}~
candi_lustt ~{{{{{yyzzzyyxwtbUP qyz{{||||}}}}}}}~
candi_lustt ~ pvxyz{{||||}}}}}}}}
candi_lustt ~{{{{{yyzzzyyxwtbUP qyz{{||||}}}}}}}~
candi_lustt ~|||||||{{zzzyxsvvum j Sz{{|||}}}}}}}}~
candi_lustt ~}||||||||{{{{{zyytun qq avz{|||}}}}}}}}~
candi_lustt ~}}}|||||||{{{{{zyxws mj Ubhuutl sxz{|||}}}}}}}}~
candi_lustt ~~}}}}|||||||{{{zzwrtsww^uwwxxwvr iz{|||}}}}}}}~~
candi_lustt ~~}}}}}}}}}||||{{zwvyyyyyyyyyyyxvsP swvz{||}}}}}}}}~~
candi_lustt ~~~}}}}}}}}}}}}|||{z{{{{{{{zzzzywkmo rwyz{{||}}}}}}}~~~
candi_lustt ~~~~}}}}}}}}}}}}}}}|||{{{{{{{{zzzxwup sxz{||}}}}}}}~~~~
candi_lustt ~~~~}}}}}}}}}}}}}}}}}|||||{{{{{zzzxt> qf pttfqeqz{|}}}}}}}}~~~~
candi_lustt ~~~~~}}}}}}}}}}}}}}}}}}|||||||{{{zxjnpwwtjsqpi lqrujnxyyxrz{|}}}}}}}}~~~~~
candi_lustt ~~~~~~~}}}}}}}}}}}}}}}}}}||||||||{{zzzzyyywuk qwxyzzzz{{|||}}}}}}~~~~~~~
candi_lustt ~~~~~~~~}}}}}}}}}}}}}}}}}}}|||||||||{{zzzyxvn Knwyz{{{{||||}}}}}}~~~~~~~~
candi_lustt ~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{{zwLtb huwx{{{{||||}}}}}}}~~~~~~~~~
candi_lustt ~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}|||||||||{{{zyxvptwyz{{|||||}}}}}}~~~~~~~~~~~
candi_lustt ~~~~~~~~~~~~~}}}}}}}}}}}}}}}}}}}}||||||||{{{zyvrwum{|||||}}}}}}~~~~~~~~~~~~~
candi_lustt NIL
davout amazing
phf :)
phf well, that's enough of that
mimisbrunnr block 447608: 3`234 txns, 999`233 bytes

ben_vulpes holy shit phf. that my loggotron does not render that properly is a fucking crime
davout at first i thought 'wow, lisp vagina!!1'. but then 'oh meh, fractal"
ben_vulpes i was baffled at first, logs do not render that well. mircea_popescu: will you accept a colon and a space after the nick since that's how most irc clients autocomplete? eh nm dun matter

Framedragger rehi! WHAT MAGICKE IS THIS "(z (complex x y))" wait a second... this is mandelbrot right??
Framedragger my client doesn't display this nicely. cool stuff! :)
Framedragger (ah, actually, i can see the vagina, so probably displays fine)
Framedragger oh this is gonna be so much fun!
Framedragger this is just my caffeinated morning hypestate, but by god if a CLI eulora client wouldn't be awesome, and it could expose an interface over irc, too, andand, you know, games over irc with lisp, i mean really why is this not a thing, software world i am disappoint! (hm granted, maybe there are some shitty text adventure irc bots.)

mircea_popescu omfg he made an asshole.
mircea_popescu Framedragger yes, my plans are generally excellent ; people take a while to catch on an' get crackin' though.
mircea_popescu ben_vulpes i will accept.
mircea_popescu Framedragger> my client doesn't display this nicely

jurov (~jurov@ec2-52-28-28-204.eu-central-1.compute.amazonaws.com) has joined #chainstate
mircea_popescu waves
mircea_popescu welcome to ben_vulpes 's castle. the princess is asleep however.

Framedragger ah shit you're right, just viewed log in terminal with monospace, different thing altogether...
mircea_popescu Framedragger it is extremely useful for a reason which you may readily grasp if you look at array vs list discussion. your eyes learn to insta-address. it's huge. fixed space is for all meaningful text ; the variable spaced font is strictly for one-read-through pulp fiction and such matter.

asciilifeform (~asciilife@unaffiliated/asciilifeform) has joined #chainstate
Framedragger guess i'd've realised this if i had to deal with more parentheses in my life heh.
mircea_popescu heh.
asciilifeform this is pretty neat.

asciilifeform caught up on l0gz
mircea_popescu :p
trinque omaigad
trinque replbot
trinque ben_vulpes: neat!

mircea_popescu THE MERIT IS ALL MINE

mircea_popescu but why! i just want to plaaaaay

mimisbrunnr block 447682: 2`261 txns, 999`786 bytes
thortron Hey ben_vulpes. I also run a trb node. Nice to be able to make sure I'm synced by checking in here instead of unnamed scam wallet sites.
ben_vulpes lol you're welcome. there's also http://mimisbrunnr.cascadianhacker.com
asciilifeform thortron: it won't tell you if you're synced, nobody can, but sometimes it will tell you if you're not.
thortron asciilifeform: understood
asciilifeform (this is not mere sophistry, imho it is important point to grasp)

ben_vulpes candi_lustt: obediently-repeat-exactly "lol i suck cocks"
candi_lustt lol i suck cocks

ben_vulpes candi_lustt lf
candi_lustt ben_vulpes: i have seen you speak in #chainstate 200 times.
ben_vulpes mircea_popescu: ^^ done
davout nice
jurov candi_lustt: hi

mircea_popescu ben_vulpes nice! now where were we here
mircea_popescu hi candi_lustt how about that jurov
candi_lustt You don't trick me, sly mircea_popescu with your stt how about that jurov lures!

mircea_popescu mwahaha
jurov rofl

mircea_popescu ben_vulpes ^ ?
ben_vulpes hm
ben_vulpes hi candi_lustt: how about that jurov
candi_lustt You don't trick me, sly ben_vulpes with your hi candilustt how about that jurov lures!
ben_vulpes where'd the underscore go, tho
ben_vulpes oh
jurov candi_lustt has only one function?
ben_vulpes pruning of all non alphanumerics
candi_lustt You don't trick me, sly jurov with your candilustt has only one function lures!
mimisbrunnr block 447694: 2`347 txns, 999`242 bytes
ben_vulpes jurov: mircea_popescu can make it have as many fns as he wants
jurov yes but when you override brain, all previous code is forgotten?
ben_vulpes well, previous definition of brain is redefined.
ben_vulpes mircea_popescu: could define all sorts of functions and call them from teh brain
ben_vulpes jurov: this isn't exactly the api that i'd program against.
jurov eh, don't be soi serious. it does not need api, perhaps something dirty like split the text into words, (if (functionp (symbol-name word)) (funcall ...))

mircea_popescu jurov for now. it's supposed to end up my ai bot
ben_vulpes jurov: phf wired an eval in yesterday, did you see that?
jurov onoes, one more lawgz to read :)
ben_vulpes dont be soi lazy!

mircea_popescu lol
mircea_popescu what that still works omfg
ben_vulpes ja
mircea_popescu candi_lustt you don't trick me with your candi_lustt lures!
candi_lustt You don't trick me, sly mircea_popescu with your candilustt you dont trick me with your candilustt lures lures!

mircea_popescu ben_vulpes splendeed.
jurov i kindly recommend to mircea_popescu http://www.norvig.com/paip.html, but have only badly scanned pdf here...
ben_vulpes mircea_popescu: i already tripped on that one

mircea_popescu jurov they already did in #trilema ; all discreetely like and in general so i don't take umbrage.

mircea_popescu The definition has two args, but the proclamation has three.
ben_vulpes on my side

mircea_popescu ah ok.
ben_vulpes needed to tell the compiler something would be there. (declaim (ftype (function (string string string)) brain))

mircea_popescu candi_lustt put this in three
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/1mfVW/?raw=true
ben_vulpes STRING STRING STRING

mircea_popescu sorry ?
ben_vulpes nm disregard. give her a brain that takes three args
phf hmm
candi_lustt phf: http://p.bvulpes.com/pastes/rNNpT/?raw=true
mircea_popescu you don't get anymore priviledges mandelbutt boy!
phf (+ 2 2)
candi_lustt 4

mircea_popescu eh wtf
phf werks

mircea_popescu ben_vulpes HE STOLE MAH LUNCH AGAIN!!1
phf mircea_popescu: your lunch has been untouched. i added a completely separate hook

mircea_popescu but i dun want you to. focus!
phf (list 'ok)
candi_lustt (ok)
mircea_popescu sigh!
mircea_popescu candi_lustt hurr durr tree ?
candi_lustt You don't trick me, sly mircea_popescu with your ( ( ( tree)

ben_vulpes phf: can you give it a trigger char and add me to the evalors?

mircea_popescu fuck.
ben_vulpes coool. k

mircea_popescu i have no idea what i'm doing.
phf ben_vulpes: trigger char is parenthesis as first character. i figured it's pretty safe when on #chainstate
ben_vulpes phf: aok neat

mircea_popescu my slutbot is a slutty bot.
phf you have to do silly things like
phf (progn *users*)
phf (progn *users*)
phf hmm
phf oh you guys are trying to make it feed out a multiline thing..

mircea_popescu i'm confused.
ben_vulpes easy with the pronouns there phf

mircea_popescu phf i'm a noob. this means i have a very poor notion of the thing's state, and very tenuous mapping from it to sense. when you go and do things i don't even vaguely understand, you cut my chances to figure out anything useful before i get bored by a factor of about 100
ben_vulpes mircea_popescu: the tree is many lines, when you return tree-thingy it prints over multiple lines. call a function called paste with the string you want.

mircea_popescu ben_vulpes yeah. how can i have it respond any multi-line in a paste ? ah! ty.
ben_vulpes something a la (paste (format nil "~A" tree-thing))

mircea_popescu ben_vulpes eat http://p.bvulpes.com/pastes/EKNCO/?raw=true
mircea_popescu uh i mean.
ben_vulpes shan't

mircea_popescu !!up candi_lustt
ben_vulpes oh wait
phf yeah, voice missing

candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/xPxrj/?raw=true

mircea_popescu ah ran out of parens has it
phf mircea_popescu: yeah, i grokked that last night, kind of gotten carried away

mircea_popescu candi_lustt did you like phf touching you inside ?
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/NFCPJ/?raw=true

mircea_popescu "you"))) fell through ETYPECASE expression.
phf hah

mircea_popescu da fuck lol this ftr is NOT RIGHT. lettuce verify these false statements from last night then!
mircea_popescu candi_lustt one two three
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/5YDlX/?raw=true
ben_vulpes yeah it's an error in the format string i gave you

mircea_popescu ah doesn't parse out its name
phf i think paste is not working right. you're passing it a list, and it wants a string

mircea_popescu yeh. btw, does tree-thingy-string recreate the tree as a new struct on each pass ?
phf that's a nifty tree though

mircea_popescu phf can you guess what my intended use is ?
phf it constructs a entirely new structure for after each invocation. god bless garbage collector.

mircea_popescu ok. how can i make it join into the same one ?
ben_vulpes naively, setf the result of tree-thingy into *tree-cache* and then merge with custom logic? or perhaps i do not understand

mircea_popescu ben_vulpes i just want every call to add to the same tree not replace it. >> not >
phf so if you have "one two three" "one two three" "one two four", first one creates struct, second doesn't change anything, third one adds enough to have "four" in appropriate places?

mircea_popescu yes, a topnode four, 3 2nd node fours, etc
mircea_popescu candi_lustt one two three
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/vGC9Q/?raw=true
mircea_popescu ah that's not how you remove things

mircea_popescu goes reads log again
mircea_popescu motherfucker.
mircea_popescu why the fuck doesn't (remove "candilustt" <>) remove it from <> !
phf mircea_popescu: correct direction, but exactly what's happening there

mircea_popescu huh ? phf it shockingly removed dick
phf removes removes items from a sequence, not subsequences. so remove can remove a character from a sequence of characters. but you're missing a function in your paste tree-thingy-string

mircea_popescu i am ? how do i remove abc from abcde ? not (remove "abc" "abcde") ?
phf you have tree-thingy, but no tree-thingy-string. everything's still working because tree-thingy-string is sitting in memory

mircea_popescu uh oh (paste (tree-thingy-string
phf right, the call is there, but not the definition (defun tree-thingy-string

mircea_popescu the definition is below ?
phf tree-thingy is bellow, not tree-thingy->>string<<

mircea_popescu ow fuck malfunction. kk good point. so why does (remove "candilustt" (remove-if-not (lambda (a) (find a "abcdefghijklmnopqrstuvwxyz ")) message)) fail to take out her name from the line ?
phf because remove compares ~each individual character~ to ~string~, which is always false, so there's nothing to remove.

mircea_popescu oh i see. is there something to compare chunks ? and is remove a primitive then ? or did we define it ?
phf yeah, remove is part of the spec

mircea_popescu a ok. now, i'd expect quoting string creates proper squence and remove then deletes it. but that's just me. i suppose i shou;ld add a nill there
BingoBoingo Hello candi_lustt, who is your daddy and what does he do?

mircea_popescu BingoBoingo the way it's set up now it uses a ton of processing for anything over 3-4 words long.
phf so for some unknown reason there's nothing like remove subsequence in the standard, there's a different place to slice in though, and it's inside the missing tree-thingy-string

mircea_popescu phf no! this is nonsense, why the fuck would i slice it there. i want to send the proc a properly formed message

phf nods
mircea_popescu also, the fact that it takes over a minute to create the tree off BingoBoingo 's sentence is very worrysome. why is it this incredibly slow ?!
ben_vulpes ah heap exhaustion of some sort?
ben_vulpes Heap exhausted during garbage collection: 0 bytes available, 16 requested.

mircea_popescu my time budget for a 30 word sentence is about 2 seconds ; and this isn't all the processing it has to do.
phf :D

mircea_popescu ben_vulpes is this an arbitrary limit you set low or as far as it goes ?
BingoBoingo Well, better than more verbose presumably organic noisebutts
ben_vulpes mircea_popescu: it is a limit from whence i know not. checking

mircea_popescu kk. phf how do i check how many words are in a string ? anyway, anyone figured out what my endgame looks like here ?x
phf there's possibly bug in the code. ~another reason~ might be the fact that it's trying to ~pretty~ print a deeply nested tree.
ben_vulpes mircea_popescu: (length (cl-ppcre:split " " string))

mircea_popescu ty!
ben_vulpes (i think)
phf hmmm
ben_vulpes phf: you want to know anything out of this ldb i just got dropped into?

mircea_popescu now do i do tree-thingy-string only if wordcount
phf hehe. well, message comes in, you want to call cl-ppcre:split on it, which gives you a list. you then check the length of list (< (length ...) 32)
ben_vulpes (+ 1 1)
ben_vulpes candi_lustt: hey
ben_vulpes oh, no brain.
phf ben_vulpes: not going to work, because my hook goes into connection, and connection gets killed every reconnect.
ben_vulpes phf: aok
phf (something i didn't realize until that first reconnect)
ben_vulpes gotcha.
phf hmm, i wonder if actually having it might help with didactic purposes

mircea_popescu lessee
ben_vulpes phf: pls to
asciilifeform did you folx post this entire thing somewhere readable ? i've been tuned in but not 100% following
ben_vulpes asciilifeform: which "entire thing"? logs are in topic
asciilifeform the bot

phf asciilifeform: nah the bot is black box as far as everyone except ben_vulpes is concerned
asciilifeform aite.

mircea_popescu (< (length (cl-ppcre:split message)) 32) ?
ben_vulpes it is very ugly, but i can share
phf it's got trinque's ircbot/logbot in it

mircea_popescu wait wait
phf mircea_popescu: yeap

mircea_popescu (< (length (cl-ppcre:split " " message)) 32) ?
ben_vulpes that's it, mircea_popescu

mircea_popescu ok, and how do i say if ?
phf (if ... ...)
ben_vulpes (if test rtue-form false-form)

mircea_popescu and can i leave false nil ?
ben_vulpes aye
ben_vulpes candi_lustt heat http://p.bvulpes.com/pastes/4dXo0/?raw=true
phf we broke it..
ben_vulpes nono, shitty manual state mgmt

mircea_popescu eh. is this from me or from you two ?
ben_vulpes from you, responses are cooked to the speaker

mircea_popescu end of file on #<SB-INT:FORM-TRACKING-STREAM for "file /tmp/G791" {1004AE3B13}> ? srsly ? i did this ?! dat G7!
ben_vulpes like a g6 likealikeag6

mircea_popescu ftr, i hereby dub a "stranding error message" that error message which forms a disjunct set with the wordset of the operator's action.
ben_vulpes asciilifeform, phf: black box kludge

mircea_popescu i have nfi what to do next.
ben_vulpes mircea_popescu: check your parens balancing, it hit the end of file before getting a fully closed form i believe
asciilifeform ben_vulpes: aaaah! this is an eliza (vs markov chain bot)
ben_vulpes it is a whatever mircea_popescu makes it, ideally

mircea_popescu oh
ben_vulpes do consider using an editor that can handle this grunt work for you

mircea_popescu ye
asciilifeform i can only imagine the agony of doing this in 'pico' or what was it.

mircea_popescu i will, just as soon as i'm happy i understand it.
ben_vulpes it is painful to watch people balance parens by hand, and once you learn to use a parens-balancer balancing *any* pairwise set of expressions becomes utter hell

mircea_popescu dude let me suffer what is with all this avoidance of pain.
ben_vulpes pain, wasted time...

mircea_popescu pain is not wasted time.
ben_vulpes i just don't want you getting bored, balancing by hand!

mircea_popescu ben_vulpes if THAT's how i got bored i'd be an idiot wouldn't i ? anyway, i'm two short not just 1.
asciilifeform this ain't the good sort of pain. leads to avoidance of things that oughtn't be learned-avoided. (e.g. nesting)

ben_vulpes mircea_popescu: i think you're too tall, but i'm actually the short one
trinque one should still go through and actually have the problem before applying the tool

mircea_popescu after a certain age you learn what you wanna learn. but anyway. trinque is wise.

mircea_popescu gorgeous.
ben_vulpes trinque: you edit lisp code with some vi mode still?
trinque I use paredit, but I only picked it up when hand balancing started to bother me. and yes evil-mode
ben_vulpes not casting aspersions let it be noted.

mircea_popescu candi_lustt one two three four
candi_lustt You don't trick me, sly mircea_popescu with your NIL lures!
mircea_popescu candi_lustt one two three
candi_lustt You don't trick me, sly mircea_popescu with your NIL lures!
mircea_popescu candi_lustt one two
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/xlQ70/?raw=true
mircea_popescu da fuck
phf mircea_popescu: your paste has too many arguments

mircea_popescu motherfucker.
mircea_popescu so i can't call paste("hurr"). why not ?
ben_vulpes mircea_popescu: try it without the parens
phf (paste "hurr")

mircea_popescu woprked fine before. why did it. uh
ben_vulpes because tree-thingy-string returns a string
phf like the calling convention is (function arg arg arg)
ben_vulpes ("thing") tries to call "thing" as a function. (+ 1 2 3)

mircea_popescu paste isn't a function ?
ben_vulpes paste is a function. "hurr" is not.

ben_vulpes of one argument. (paste "hurr")
mircea_popescu nil is the fucking terminator for the if not the fucking parameter for paste omfg

ben_vulpes what's it doing in the paste call then?. also you can omit the nil as else-form entirely
mircea_popescu you told me to take off the parens!

ben_vulpes yes, off "hurr".
mircea_popescu yes, i can omit it. i'll make my life easier just as soon as I HAVE ONE.

ben_vulpes lol. just move the nil outside of paste
mimisbrunnr block 447702: 2`763 txns, 998`190 bytes

mircea_popescu candi_lustt hurr durr
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/4E0pg/?raw=true
mircea_popescu this also didn't work correctly as far as tree-ing goes, but let's see if i can get her name nuked now.
phf if you're using ppcre already (regular expressions) then might as well go for (ppcre:regex-replace-all "candi_lustt" "foobar candi_lustt test" "")
candi_lustt "foobar test"
candi_lustt You don't trick me, sly phf with your NIL lures!

mircea_popescu if i replace the string "message" with the string "(remove ("candi_lustt" nil) message)" will this result in the name being nuked from lines ?
candi_lustt You don't trick me, sly mircea_popescu with your NIL lures!
mimisbrunnr block 447703: 2`260 txns, 998`224 bytes
ben_vulpes imma step out shortly for a bit to roll the child around in the snow
phf well, yes, you want to replace message with a different form, that will remove a substring from the message. (remove ... message) wouldn't work though, as per above discussion. but that (ppcre ...) line will. you just want to replace the sample "foobar ..." with message

mircea_popescu how does one turn the quoted string "123" into a proper list ?
phf you can for example do
phf (coerce "abc" 'list)
candi_lustt (#\a #\b #\c)

mircea_popescu is everything in lisp "for example" rather than "to obtain metal piece you use cnc mill so and so" ?
mircea_popescu (remove (coerce "candilust" list) (coerce "candilust hurr durr furr" list))
ben_vulpes "some asse^H^H^H^Hthinking required"
phf the lines along which you are cutting this metal piece are a very fine. because i've never thought of teaching it, i don't know what is a reasonable subset of functions to use

mircea_popescu ah
phf you can for example do
phf (map 'list 'identity "abc")
candi_lustt (#\a #\b #\c)
phf or
phf (loop for c across "abc" collect c)
candi_lustt (#\a #\b #\c)

mircea_popescu jesus christ loops over strings to make charlists to remove from other strings. my skin is crawling.
phf well, none of these approaches are going to solve your problem though.

mircea_popescu the problem of "take 'abc' out of 'abcd ef' so as to get 'd ef'" ?
phf ye

mircea_popescu am i unreasonable thinking this makes lisp less of a language than even perl, php, etc ?
phf yes

mircea_popescu can you explain it ? and if you're wondering i have no intention of keeping that ppcre in there, either. i put it in because curious if it works, that's all.
phf well, ok, i think it would've been handy to have a "remove a subsequence from a sequence" operation in the standard. that operation doesn't actually exist in perl or php. what perl and php gives you, since they are unix languages, are a lot of ops that let you manipulate strings in a haphazard manner. "remove a substring from a string" is one of them. lisper solution is if you're going to muck with strings that way, then just use a regexp

mircea_popescu because a string is a subtype of array (ie with single-byte elements) and if you're going to fuck with deletion in arrays might as well do it honestly, and lisp has delegated "fuck with array and spit out list" to "regexp" ?
asciilifeform mircea_popescu: you need thisxi or similar. and no, it isn't built in.

mircea_popescu yeh, reason i'm bitching is that it'd increase my code 60%
asciilifeform nobody 'delegated', the ppcre thing was written eons after standard was closed.

mircea_popescu I mean mentally. his solution seems to be "just use regexp" which im trying to evaluate. what makes him think this way and why.
asciilifeform whether this is same as complaining that your house didn't come with a cement mixer, or if it had not come with washer, is matter of taste. but often you will find that you are doing Wrong Thing, algorithmically, if you are continuously reaching for these absent pieces.

mircea_popescu i'm keenly aware of that possibility yeah. which is why i'm so verbose about this.
asciilifeform so, in mircea_popescu's case, there ~is~ a 'subst' in the standard, which substitutes in subtrees.
phf mircea_popescu: well, no ~my solution~ is different

mircea_popescu oh did i get confused ? what was your solution ?
phf the reason why i for example said, move it into tree-thingy-string is because you're constructing a lot of concepts here, that you keep implicit. like you keep talking about "words", whereas your input is just a string of characters. a correct solution is to have a thing that knows how to convert string to words (even if very naively) and then after manipulate the result in terms of word (i want to remove word "candy_lust" from the list of words)

mircea_popescu why the fuck does the "only character" limitation exist, even! i can't grasp this.
asciilifeform exist in what ?

mircea_popescu in remove. and am i misguided to worry about the insanity of processing data i know i don't want processed ? such as all those subleaves i won't want or use ?
asciilifeform it doesn't.

mircea_popescu then what the fuck's the problem ? if i can remove "a" i should be able to remove "ab".
phf asciilifeform: he means "only single element"

mircea_popescu these aren't substantially different. i am being sold a house with a special door only allowing men to pass! WTF!
asciilifeform mircea_popescu: no! "ab" is not a single object !

mircea_popescu how the fuck not.
asciilifeform it is algorithmically wholly different game, to remove a ~subsequence~. it isn't an O(N) operation any more.

mircea_popescu so in this sense lisp is even more narrowly married to the hardware than c ? "but mp, it makes no difference a one letter and a two letter word are the same thing, we didn't implement it that way".
asciilifeform they aren't the same thing on any known iron in any known universe

mircea_popescu two byte items are for 16 bit machines what one byte items were on 8 bit machines : machine words. but this aside, seriously, i need to care as a high level language user what the register size was at some point because someone thought it a good idea to bake "char" length into their algos ? really now, of the byte-array "abc", "ab" is an element just as "a" is an element. you will have to cut up this array, and presumably will prefer to spit out a list. this is nice. whether you cut by the character or by the 58 characters should be irrelevant to you, and user-specified.
asciilifeform the language is bitness-agnostic. but 'string' is defined as 'vector of characters' and a 'vector' is a thing that can be operated on one element at a time. now there was once a d00d named danny hillis, and he built 'connection machine', which operated on 65536 things at a time, and he ~did~ have to augment commonlisp to make this semantically convenient in it. fwiw. but even there, 'nix the substrings' is NOT a thing that you get 'for free' without thinking about it. because it is algorithmically nontrivial.

mircea_popescu how do i define my lines to be proper lists rather than this, and were i to so define them, could i sanely process them ? fuck this "string vector" bs, i have nfi why it exists even
asciilifeform mircea_popescu: it exists because -- as phf iirc explained earlier in thread -- ~list~ is not a random access item on vonneumann machine, it is O(N). whereas array access is O(1).

mircea_popescu i want the string "abc" to be interpreted by the machine as the list "a"->"b"->"c"->nil whereby the deletion of "b" requires changing ONE pointer ; and the deletion of "bc" requires changing... ONE pointer. and to do this i gotta collect both strings ? i'm starting to understand the wisdom of phf 's "do it in tree thingy". if you use "words" then first define words, then nuke the bad word.
asciilifeform aha!

mircea_popescu myeah.
mircea_popescu candi_lustt candi lust
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/fQgOl/?raw=true

mircea_popescu (remove-duplicates (split-sequence:split-sequence #\space s :remove-empty-subseqs t) :test #'string-equal))
asciilifeform i thought you were trying to get rid of ppcre. (split-sequence is not in cl)

mircea_popescu o that neither ? i don't know it unless it says specifically, like cl-ppcre:split. so how do i turn a vector-string into a list of "words" ?
asciilifeform no built-in canned operator for this

mircea_popescu dude srsly... i can't possibly be the first guy who wanted to split up a string this way.
ben_vulpes i wrote my own the one time i was reluctant to pull in ppcre. lisp world was not written around strings, as phf pointed out in his critiques of my v.

mircea_popescu hm. well, this started very enjoyably but it's getting bogged down in the utter impracticability of lisp. the 2nd day i'm not perceptibly closer to implementing what i want, and now i face the unpleasant choice of a) rewrite php in lisp ; b) import a php rewrite to lisp someone else made or c) abandon the notion that anything useful may come of this.
asciilifeform this kitchen doesn't have a cement mixer built in.

mircea_popescu i have nfi what it was written around, but evidently there's a plain and simple usecase here that it's shit for.
asciilifeform you put one in. it's what, 3 lines.

mircea_popescu yours was 12.
asciilifeform 14.

mircea_popescu but the problem is, NEXT time ima wanna do something, it'll be another 14 lines.
asciilifeform this is universal, not even PL/I has EVERY possible widget built in. and if you had such a language, it'd be a javaesque nightmare.

mircea_popescu "take what candi_lustt heard, wipe out all punctuation, split into a list of words and remove her name" is not... "every possible widget"
candi_lustt You don't trick me, sly mircea_popescu with your NIL lures!
asciilifeform lol

mircea_popescu and the saddest part is that i struggle with conceptually coming up with a model that usefully de-stringifies a string for lisp's needs that's also not a whole ai by itself. the whole fucking point of natural language, on meditation, appears to very much be "it not being lisp". in any case the impedance mismatch of primitives is well shocking.
asciilifeform ppcre more or less turns the thing into perl, for use by incorrigible perlists. if you really must, can use that.

mircea_popescu or i could just use perl. this is the problem here.
asciilifeform you don't get the error handling, or 1,001 other things, including the company of sane folx, if you do. but sure, plenty of folx -- use perl. and drink rotgut, and eat mcd. etc

mircea_popescu i must say i'm not impressed with the very tiny slice of error handling i saw so far. about same preponderence of stranding error messages as fortran.
asciilifeform again it isn't a socialist 'get it for free' item. you gotta ~use~ the mechanisms to implement it.

mircea_popescu error message must in all case reference a symbol operator manipulated. this is not escapable.
asciilifeform again, this expectation of a 'dwim ai' giving meaningful eggogs For Phreee

mircea_popescu <SB-INT:FORM-TRACKING-STREAM "file /tmp/G791" or {1004AE3B13} aren't symbols i manipulated. and i don't care the machine THINKS SO. i don't think so, and that controls. also import here the c-makes-you-liexii threadsa.
asciilifeform mircea_popescu: where'd these come from ? srsly i'm mighty curious nao

mircea_popescu i opened 16 closed 14 parens. you can prolly see the exact state owing to the ~extremely well designed~ process i came up with ; they're in the logs.
asciilifeform you do understand that this makes your ast ambiguous, right ? doing the Right Thing in such a case is ai-complete.

mircea_popescu asciilifeform saying "your ast was ambiguous" is way better than this. see, it very c-esque-ly tries to be very specific and objective about a fundamentally unspecifiable situation. really, it was 1004AE3B13 ? o noes!
ben_vulpes mircea_popescu: those are artifacts of the system you commissioned.

mircea_popescu ben_vulpes ah are they ?
ben_vulpes that it behaves insanely is because i made it do insane things. yes.

mircea_popescu ah ah
asciilifeform in other news, woodchipper dun care if it's chippin' wood or flesh, bone.

mircea_popescu if no one screams no one knows.
ben_vulpes you are fighting unnecessary layers of abstraction.

mircea_popescu but moving on : how do i process strings in lisp in a way that doesn't reduce to "you really should have just used bash" and which ALSO doesn't require me to first teach a machine french.
ben_vulpes "why did it barf and not tell me there were no parens?" "no sane person would write and test code that way"

mircea_popescu Dja see the thing above about inspecting historical state ?
ben_vulpes as in "read teh logs"?

mircea_popescu yeh.
ben_vulpes yes, it's called a repl. most of us use one on our computers.

mircea_popescu but most^H^H^H^ all of you can't see each other's.
ben_vulpes has history, scrollback, state, close coupling to code under development.xiii

mircea_popescu riight.
asciilifeform ~everybody has heavily custom workflow. asciilifeform for instance has a button on keyboard that evaluates the form the editor cursor is in. and another that evaluates any highlighted forms. a 'form' in this case is any (..........) that isn't inside of some other (.......) in file.

mircea_popescu yes, and i'm sure it works for you, but you don't have a good answer to "what was that then" that you can show me. i could show you. this is something, even if it's not the something you want to have.
ben_vulpes what is this "what was that then"?
asciilifeform the answer to 'what was that' is the 'that', which i have just as readily here (a list of forms that got evaluated)

mircea_popescu ben_vulpes i don't have all this set up for search, but he asked me above "where did these symbols come from". the whole process that produced them is right there ready to be examined. by him, even if it was my process. he/you want to tell me about how your process is ready for you to examine. that's nice, but also a fundamentally different thing.
asciilifeform if you treat your proggy as a set of lines that get eval'd sequentially, from scratch every time, as if you were writing bash script -- this is fine, and you get serialization for phreee, but at the cost of losing the repl. ideally you write in such a way that you don't violate the semantics by repling (and so pasting your code results in something another fella can replicate, if you are collaborating)xiv
jurov removing substring without ppcre: (subseq "abc def" (+ (length " abc") (search "abc" "abc def") ))
asciilifeform jurov: this doesn't do what you expect, i suspect for one thing, it doesn't remove multiple instances
jurov i tried it. with little massage it can remove from middle, too
asciilifeform for another, it won't handle the case where 'abc' is not found

mircea_popescu hm! so subseq takes string and returns substring between two indices ?
asciilifeform and when you add in these missing pieces, it will look exactly like the snippet i gave to mircea_popescu earlier.
jurov nope, where do you see loop?
asciilifeform jurov: if no loop, it will replace ONE ocurrence

mircea_popescu asciilifeform the sadness right now is that you just dropped the bomb of all time pointing out "turn string vector into list of string vectors by character delimiter" is ppcre also. which maxed my dosimeter.
phf mircea_popescu: it's not actually ppcre, but it's not in the standard either

mircea_popescu what's "not in the standard" mean here ?
asciilifeform mircea_popescu: it means 1) not in http://www.lispworks.com/documentation/lw50/CLHS/Front/X_AllSym.htm and 2) not guaranteed to be available on a brand-new cltron
phf well, point 2 is kind of irrelevant

mircea_popescu should i care about either of these ?
asciilifeform whole point of a standard...
phf it's third party code, written on top of the bedrock
asciilifeform because if you don't give a fuck about standard, and 'i'll stick with sbcl for life!!!' you suddenly have ~all of the missing parts
phf ok this is actually misinformation given the subject

mircea_popescu standard is one thing, but at some point someone is going to write a fucking library . i can't reject everyone's libraries because they're someone's libraries.
asciilifeform phf: how's that -- pretty sure sbcl has complex string-munging in it
phf split-sequence doesn't come with any lisp environment, it's third party code, that's written in lisp. i.e. a library
asciilifeform mircea_popescu: there is ppcre.
trinque this can certainly be done with the loop macro, if we're talking about tokenizing a string by say space, or w/e.
phf for the record ppcre is ~written in lisp~, also a library

mircea_popescu so can we come up with a "the tmsr correct way of take string, produce list of words" ?
phf yes

mircea_popescu how does it go ?
asciilifeform ( (possibly) interestingly, cltl2 has some discussion of items that were considered for inclusion in the standard, but did not make it, and why )
ben_vulpes herexv's one splitter.

mircea_popescu why does it reverse words and what's that ?
asciilifeform because consing is 'lifo'
ben_vulpes (cons 1 nil)

mircea_popescu ah. word order is irrelevant here, so. how would i have this item count the elements it produced ?
ben_vulpes (length (mp-split "stuff and things"))

mircea_popescu that's the element count, not some byte nonsense ?
ben_vulpes aye

mircea_popescu nice!
ben_vulpes or at the end (values words (length words)), which will return 2 values, the list of words and the number of them.

mircea_popescu and how do i have it take out specified element ? oh nicer!
ben_vulpes remove would work in all likelihood

mircea_popescu thisis the part of lisp i like the most!
ben_vulpes you could even make it take an arbitrary delimiter if you'd like, or a set on which to split.
phf (remove "word" (mp-split "foo and word and foo") :test 'equal)
ben_vulpes or use cl-ppcre, which is what i do. oh and dump the progn, that's 100% unnecessary artifact.

mircea_popescu does this then return the list and its length ?
ben_vulpes i don't know man why aren't you evaling this code yourself?! let me paste that into my repl for you. no, by inspection that only returns the length of the list of words

mircea_popescu honestly, because i don't expect i'll be able to navigate the error bonanza.
ben_vulpes any sane lispolator drops you into a debugger.

mircea_popescu i was trying to avoid masturbation. with this entire exercise. otherwise yes i can just install something somewhere and go away dicking with it forevermore. i think it's been done actually. so my logic is : i added a further item in the definition, and a further calculation at the end.
ben_vulpes ah i see what you're trying to do
trinque lisp has a notion of multiple return values from a function. done by doing (values 1 2 3)

mircea_popescu defun mp-split (s &optional words length)
ben_vulpes correct.

mircea_popescu holy shit there;s a "define" which DOES?NT define the thing ?
ben_vulpes (s &optional words length) is the list of arguments to the function

mircea_popescu oh. so the idea is, it'll return whatever it damned well please ?
ben_vulpes to tell the compiler types etceteras you use (the ...) but this verges on masturbation. and yes, unless constrained to return only ints, strings, clos objects whatever, it does return whatever it damn well pleases. 'dynamic language'. user may constrain this.

mircea_popescu and to make it return three values i... change (values words (length words)) to (values words (length words) "the letter 4") ? and so values is a keyword which does what return does ?
ben_vulpes aye. now to bind that you'll need multiple-value-bind

mircea_popescu to.. bind ?xvi
ben_vulpes to use the return values of that function elsewhere, you'll need to bind them explicitly at the call site of mp-split, otherwise you'll only get the first. standby.
asciilifeform if you were writing this to 'pour into cement', you generally would not want it to do the potentially expensive O(N) finding of the list length every single time forever

mircea_popescu it's only called once per chatline and i want the length once per chatline, so i think is right as is.
asciilifeform consider that most of the things you end up doing with a list do not require you to know its length in advance.

mircea_popescu but here they do - i want to not process lines longer than x words
asciilifeform then yes

mircea_popescu ben_vulpes ima try to put this in bot one sec.

asciilifeform often the answer is this.

mircea_popescu candi_lustt * asciilifeform is still in the mental key of thread re 'why the fuck is this essential $item not in standard !111'
mimisbrunnr block 447718: 2`574 txns, 999`951 bytes
mircea_popescu wtf not defined ? it's right there ?
mircea_popescu ough
mircea_popescu wtf bbq chain of these i don't understand
ben_vulpes reverse the order or forward declare the function. i pasted you a declaim once upon a time when you asked where "brain" was defined. compiler will not assume that a function exists, how would it know its lambda list?

mircea_popescu ben_vulpes am i mistaken in thinking your http://p.bvulpes.com/pastes/hkID2/?raw=true was erroneous in that either the inner call needs a 2 or else the 2 is spurious in defun ?
jurov it's only a style-warning
asciilifeform just like in most languages, a symbol gotta exist before you can use it

mircea_popescu holy shit in order ? really ? that's like the #1 thing i hated about c. it's fucking there!
asciilifeform it dun have time travel either, you gotta WRITE the proggy before you can run it! suxxxxxx

ben_vulpes mircea_popescu: mine is 'erroneus' in that i wanted to eval your version next to mine.
trinque ben_vulpes: you didn't change the recusive call's name
ben_vulpes oh yes then completely erroneous.

mircea_popescu candi_lustt
mircea_popescu ahh i added no visualiser.
mircea_popescu candi_lustt
mircea_popescu i have nfi why it's silent.
ben_vulpes sumfin broke. specific error is Value #<PURI:URI http://p.bvulpes.com/> can not be converted to an SQL literal.

mircea_popescu to a... there's sql in this ?
ben_vulpes there is a wealth of information that this channel is eliding. yup, that's the channel over which the irc connection passes data to the parser

mircea_popescu ah k
ben_vulpes candi_lustt
ben_vulpes ah mircea_popescu you are calling format t. t writes to process stdout.

mircea_popescu it's your code!
ben_vulpes you want format nil, that returns the cooked string. i wrote it in my process, you must read it and make it work for yours. it is only there to do something with the values

mircea_popescu aok. so t is actually a language primitive in that context ?
ben_vulpes aye. all objects descend from t, it would be True in say python

mircea_popescu aha. and nil is f ?
ben_vulpes nil is false

mircea_popescu but is nil === f or just = ?
ben_vulpes stahp
trinque there isn't an f

ben_vulpes standby

mircea_popescu poor phf i think he's overwhelmed by all the layered crazy.
ben_vulpes i'm there as well

mircea_popescu well supposedly it's fun. at any rate i'm missing out on a tango party for this, so.
ben_vulpes that fetch failure is an indication i should do what phf said to do and eval directly from string

mircea_popescu ah there, her diet's over. ok so
mircea_popescu <mircea_popescu> ah there, her diet's over. candi_lustt
ben_vulpes ah i think i see. who knew so much complexity could be crammed into so few lines of code

mircea_popescu it's the way of the korgar, son of man
ben_vulpes let me find the last brain that worked. yes okay paste returns an object that does not serialize nicely. COOL

mircea_popescu it's your code!
ben_vulpes mhm
jurov no such candi_lustt
mircea_popescu lol
mircea_popescu <mimisbrunnr> block 447720: 2`400 txns, 998`205 candi_lustts
candi_lustt http://p.bvulpes.com/pastes/vMZXh/?raw=true
mircea_popescu candi_lustt
candi_lustt http://p.bvulpes.com/pastes/dyp7L/?raw=true

mircea_popescu at this juncture i want it to reduce all chains of whitespace to one whitespace. afaik lisp does this itself, for code ?
jurov yes, there's "read" function that does itxvii

mircea_popescu lettuce see here.
mircea_popescu <mircea_popescu> candi_lustt
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/y6pNe/?raw=true
jurov and also, read-from-string . both need to be called repeatedly to yield next token

mircea_popescu yeh. There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION SB-GRAY:STREAM-READ-CHAR (3)> when called with arguments [that you used]
phf well, there were 5 different people saying things at cross concern, it disrupted the cohesion of narrative (that was already tricky to keep coherent, because i was coming up with things as i go).

mircea_popescu getting half a dozen people to lisp-cvas is possibly the tallest dance there is huh.xviii
phf i think it's more of a "two doctors is the death of the patient" kind of issue. like read/read-from-string. yes they can be wrestled into reading words ignoring whitespace, but you can't just slice it into code above. that's an entirely different strategy for solving this problem.

mircea_popescu hm. it is beyond me why this is a problem needing strategies, but perhaps in time. is there a way to instruct your alphabetizer to permit only one space ?
phf there's not even an easy way to say what read-from-string ~does~ without going into a lot of heavy arcana

mircea_popescu alright.
phf your turn string to words operation used to eliminate duplicate whitespace already. actually one sec (mpbot::mp-split "foo bar qux" " ")
ben_vulpes i have since rebooted the whole thing
phf (mpbot::mp-split "foo bar qux" " ")
candi_lustt error: #<simple-error "~@<There is no applicable method for the generic function ~2I~_~S~
phf (+ 2 2)
candi_lustt 4
mircea_popescu the generic function ~2I~_~S~ ? srsly ?
phf (mpbot::mp-split "foo bar qux")
candi_lustt error: #<simple-error "~@<There is no applicable method for the generic function ~2I~_~S~
mimisbrunnr block 447722: 2`482 txns, 998`194 bytes
ben_vulpes this is where i say "you know if weitz wrote a lib that does this..." cl-ppcre:split returns empty sequences for the delimiter-only subsequences
phf yeah, there's a library that's called split-sequence that we were using before everyone decided to come say things :}

mircea_popescu yeah i suspect we'll be going back to using it. seeing how lisp is great except the greater it gets the less it can be used.
phf but yeah
ben_vulpes phf: sry, i grew weary of the "omfg not in standard" thread

phf (split-sequence:split-sequence #\space "foo bar qux")
candi_lustt ("foo" "" "" "bar" "" "" "qux")

mircea_popescu how do i not permit empty sequences ?
phf (split-sequence:split-sequence #\space "foo bar qux" :remove-empty-subseqs t)
candi_lustt ("foo" "bar" "qux")
phf that's already in the code, but it doesn't need to be, can also do it ourselves

mircea_popescu aha!
phf (remove "" (split-sequence:split-sequence #\space "foo bar qux") :test 'equal)
candi_lustt ("foo" "bar" "qux")

mircea_popescu why is :test 'equal, whats : and ' and wtf.
phf functions take mandatory arguments, optional arguments and keyword arguments

mircea_popescu in this case, function is remove ?
phf yes. it takes a bunch of parameters that lets you narrow down what and how you're removing
phf (remove "" (split-sequence:split-sequence #\space "foo bar qux") :test 'equal :start 2)
candi_lustt ("foo" "" "bar" "qux")

mircea_popescu helpfully not documented on the clhs poage
phf no it is

mircea_popescu sadly im looking at it
ben_vulpes what "this" is not documented?
phf it's pretty simple, everything that we're talking about in this part of the conversation is documented on clhs, so it's a pretty safe bet to say "yes"

mircea_popescu anyway. i'm sure the probvlem is my inability to read.
phf remove documentation page will document what kind of arguments, optional arguments and keyword arguments it takes

mircea_popescu the "arguments and values" section, owing to it evidently aiming to be correct, manages to be meaningless to me.
phf aah

mircea_popescu anyway. let's see if we can re-achieve the peak of glory of late yesterday after a full day's work today. to think all i wanted to do is add a fucking counter so it only takes lines
phf that should've gone into the tree-thingy-string :p

mircea_popescu phf aha. by calling length and if-ing it there ?
phf yeap, you already have those words all nicely split up and prepared. can limit the length ~of words~ can also ~remove words~ that you want to filter out
asciilifeform ideally you would give eat-words a param of max-words, after which it aborts, rather than eat and then count if above limit

mircea_popescu i'm not going to talk to you anymore because saint phf says you'e leading me into the temptation of things.
phf (equal "hello" "hello")
candi_lustt t
phf (eq "hello" "hello")
candi_lustt nil
phf (eq; "hello" "hello")
candi_lustt error: #<end-of-file {1004F33FB3}>
phf (eql "hello" "hello")
candi_lustt nil
mimisbrunnr block 447724: 1`685 txns, 998`125 bytes
phf anyway lisp has a bunch of equality operations that range in the depth of inspection. it's usually prudent to know the difference and use them appropriately (because will have significant impact in speed) impact at scale only

mircea_popescu so basically you got = == === just like everyone else. nice.
mircea_popescu candi_lustt apples and oranges
candi_lustt mircea_popescu: error, see: http://p.bvulpes.com/pastes/sIHsd/?raw=true
phf you need to wrap your (tree-thingy-string ...) in something that produces a string result. but for good measure really ben_vulpes should make paste take any kind of possible type

mircea_popescu (remove-duplicates (split-sequence:split-sequence #\space s :remove-empty-subseqs t) :test #'string-equal))
phf (let ( (abc (+ 2 2))) abc)
candi_lustt 4

mircea_popescu i wanna call tree-thingy on it, but only if its length is under x, so i dont wanna say it twice
phf (let ( (abc (list 1 2 3))) (length abc))
candi_lustt 3

mircea_popescu so let (name (value)) ?
phf it's what ben_vulpes was referring to as "binding".

mircea_popescu ah.
phf (let ( (name value) ...) ...)
candi_lustt error: #<sb-int:simple-reader-error "too many dots" {10055B2B23}>

mircea_popescu ok
asciilifeform let creates a universe that is the same as surrounding universe except that such-and-such symbol(s) are bound to particular values. it also has an implicit progn in it,.

mircea_popescu well that's nice.
mimisbrunnr block 447725: 1`926 txns, 998`200 bytes

mircea_popescu anyway, i'd like to continue but i'm entirely mentally exhausted. so perhaps another day.
phf hehe, i knew when to zone out :} there's a dozen of layers of complexity in common lisp. there are parts that date back to mccarthy's LISP days, and those are traditionally used for teaching purposes, because for all practical purposes they are reducible to cons cells and recursion. yesterday today made me convinced that there's wisdom in hanging further knowledge off of those rather than going for "best practices".

mircea_popescu so thinking about it - on one level it's a fact that what i want to use are two distinct types - "lines", which consist of alphabetic characters + spaces and "words", which consist of alphabetic characters only ; and on the next level that i was not aware of this, specifically, but vaguely, before running into the lisp obnoxiousball, so therefore it can both be said that it is useful in that it organizes thought and hoped that it can be chiseled into less obnoxious more ball with a little more practice than two days' worth.

davout o god. this ia thing is alive. after reading #chainstate my conclusion is that mircea_popescu would enjoy ruby very much!
trinque o lawd
mircea_popescu lol and whyssat davout ?

davout string manipulation just seemed very painful
mircea_popescu well, a large part of the problem is that strings aren't something. ie, the veterans' objections couldn't be dismissed.

davout yeah, of course
mircea_popescu on which basis i enjoy ruby a lot less.

davout the point is simply that it bundles a good bit of convenience, which may or may not be a good thing depending on the particular point of view. either way, the repl looks pretty nifty

mircea_popescu the objection is that it bundles incorrect convenience, which is NEVER a good thing. link here to http://btcbase.org/log/2017-01-09#1599790 ; anyway, i quite enjoyed flailing for definitions once i realised what the problem was (you can tell i move to arrays at some point in a desperate bid etc)
a111 Logged on 2017-01-09 15:10 mircea_popescu: this is how a mother acts, and why kids have not much business with her past the age of about 10 or so, depending how retarded they are.
davout what distinguishes correct from incorrect convenience ?

mircea_popescu something (convenience, anything else) is correct if it scales, which is to say is derived from the prime mover. anything else - incorrect. sinful is also a proper attribute of incorrectness, because it is literally a headless spawn of the very devil.
davout not sure i really get what you mean by "it scales". if you bundle lots of shit, it quickly becomes unmanageable because all abstractions and conveniences have a cost.

mircea_popescu not so. i can go from everything i do in an infinite string of correct whys to prime logic. broken shit can't do that. possibly your idea of "scales" is tainted by the idiots, "to scale means to be used by a larger cattle headcount". that has nothing to do. to scale means to go up the abstraction tree. an apple is a correct apple if it scales, ie, if the concept of apple follows from it.
davout what's "prime mover" in this context?

mircea_popescu literally the aristotelian imperative. the first thing to have moved.
davout it's still not very clear to me how the ability to manipulate string a bit more easily is equivalent to heresy. would the same functionality, included in cl's standard be deemed heretic?
asciilifeform davout: notice that it ~wasn't~ included! 'if your grandmother had balls...'
davout i do

mircea_popescu "it's not clear to me how the ability to manipulate something you can'd define is equivalent to http://btcbase.org/log/2016-12-16#1583902 "
a111 Logged on 2016-12-16 06:24 trinque: in other python 2 was already shit... all([]) -> True yet any([]) -> False

mircea_popescu all you need is a false implication somewhere, davout ; ANYWHERE. once you have it then everything becomes provable.
davout strings defined as byte vectors is pretty unambiguous

mircea_popescu yes but now define ruby's notion of substr. see the whole point of "string" as a concept (and from it, as a type) is based on a fundamental ambiguity. now it's this, now it's that.
asciilifeform davout: cl chars ain't bytes. nor null-termed, nor contiguous in memory

mircea_popescu that's an anti-helpful objection.
davout i'm afraid i don't see that particular ambiguity

mircea_popescu i know. i hadn't seen it until yesterday either.
asciilifeform it is in fact useful to remember that the 'convenience' of cstring is == to the 'convenience' of shitting on the floor where you stand.

mircea_popescu this is something you can remember only if you already groked it.
asciilifeform tru

davout mircea_popescu: #chainstate ref plox?
Framedragger inb4 cross-channel reference and search system!!
mircea_popescu there's two points. one, where i saw it at the periphery and feared it may be a thing, which made me pretty pissy : http://logs.bvulpes.com/chainstate?d=2017-1-11#1340 and then http://logs.bvulpes.com/chainstate?d=2017-1-11#1374 as the issue was structuring in my head. then of course the closing comments early today morning, http://logs.bvulpes.com/chainstate?d=2017-1-12#323 as the thing couldn't actually be dismissed. if you look through the log it's pretty evident alf understands exactly what the problem is, in spite of his deeply boneheaded, inept self-expression. which sadly makes it evident only retrospectively. then again how to speak truth to clueless is a quite open problem in the first place. but that's why he speaks of socialism and getting for free and etc.

davout the reason some of the string primitives aren't included, e.g. "substring" is that they're O(n)? In other words, that the convenience comes at the cost of incentivizing operator idiocy?
mircea_popescu vice-versa : they have to cost that, because they're stuck papering over the fact that the operator has no idea what he wants.
asciilifeform well, for starters, much worse than O(n), but mircea_popescu nails it.

mircea_popescu the computer doesn't in the slightest mind running in a for loop from now until the heat-end of history. however, it would humbly request you actually write its death sentence deliberately rather than by uncomprehended accidenty. which is altogether not an unreasonable bar for all slavery.
asciilifeform this is main reason why haskell and other 'lazy eval' systems are malignant -- they create 'secret talmud' of workable ops, that are not visually distinct from intractable ones.

mircea_popescu mistreating the slaves is the ruin of the house.
davout right.

mircea_popescu don't tell me all this nonsense now makes sense to you ?
davout i see your point mucho better

mircea_popescu well then.
davout not sure what asciilifeform means in his last comment
asciilifeform which, ?
davout mircea_popescu: i see the point in general, but i'm not sure i'd take it as far as considering some additional string primitives as being evil
davout http://btcbase.org/log/2017-01-12#1601874
a111 Logged on 2017-01-12 14:09 asciilifeform: they create 'secret talmud' of workable ops, that are not visually distinct from intractable ones

mircea_popescu well, entirely depends on your definition of evil, but the point remains they're not helping you, they're just smothering you. aka "you can get some version of what you possibly wanted done very easy at the cost of understanding what you actually wanted or what the hell's the differece.". cue ballas with his "there's a difference between what you need and what you want, and the media will relentlessly give you strings".
asciilifeform in some programming systems, it is very easy to inadvertently ask the machine to solve an np-hard problem. and for 0 good reason, other than that making such a language stroked academitard cocks. in other languages, e.g., python, ruby, there is a lesser sin, you end up stuffing multitude of O(n) ops in places where you oughta have O(1), O(n^2) ops where with some thought you could've had O(n), etc. and the braindamage adds up
davout ic

mircea_popescu it's very symbolically imperial, also. the language of "rights" and "rule of law" makes it trival to start a "war on drugs" or "women against rape". then the state ends and everyone is at a loss why the fuck it did.
davout yea, i guess the question is where you stop. at which point do you decide that you're going to buy these apples instead of growing them, because ultimately you want an apple pie

mircea_popescu no, not really, because i buy ~apples~. your question would be "at which point you stop buying canned frozen fruit tm for your apple pie". anyone may give his own answer, but in my case it's long, long ago. and yes i plant my own lovage, in buenos aires, because the plant doesn't exist and "soup condiment mix" doesn't satisfy.
asciilifeform davout: http://www.xach.com/naggum/articles/3144404199547949@naggum.no.html

asciilifeform '...suppose you drive down the highway and you suddenly want to go some nice place you saw just before you pass a forest. you veer off the road, plunge into the wilderness and promptly decide that you need four-wheel drive, a huge cutting device in front of your car, much better shock absorbers, a bigger engine that could actually run on swamp water instead of getting all drowned, and then need an amphibious vehicle to get across the'll that right away after you made up your mind to veer off the road, and This Is Surely Somebody's Fault...'

mircea_popescu fwiw i wasn't terribly impressed with that particular statement.
asciilifeform (piece was not about strings, but another 'need' vs 'want', but otherwise very similar idea)

mircea_popescu actually, let me restate it in a form i better like! i now have to start writing an article IN THE MIDDLE OF WRITING AN ARTICLE. damn you all!
asciilifeform lel
Framedragger "so you have two tits right"
deedbot http://trilema.com/2017/the-general-brendan-eich-jwz/

mircea_popescu candi_lustt
candi_lustt You don't trick me, sly mircea_popescu with your ( ( ( candilustt))) lures!

mircea_popescu ok well this is pretty epic then. let's break it.
mircea_popescu <mircea_popescu> ok well this is pretty epic then. let's 5435345 break it.hurr ho!33eq
mircea_popescu <mircea_popescu> ok well this is pretty epic then. let's 5435345 break it.hurr ho!33eq lol i was waiting for you candi_lustt
mircea_popescu aaaan we're out of time. serious question phf ben_vulpes who else knows lisp : can the above be made to return in

candi_lustt has quit (Ping timeout: 240 seconds)xix
davout mircea_popescu: painful morning eh
mircea_popescu i kinda had fun actually.

davout pain can be fun i guess!
mircea_popescu lol i guess so

davout the more pain you get, the more pleasurable the AHA moment is in my experience
mircea_popescu the only sad part here is that lisp dun actually seem to be usable for computation.

davout same as a plane i guess, gotta spend some time sucking before actually being able to go on your own
mircea_popescu the plane actually flies.

davout well, not if you don't know how to beat it into submission!
mircea_popescu i am more or less satisfied with the beating. the problem is that when i finally took off it seems to be going at ~0.001m/s which is not a speed.

mimisbrunnr block 447988: 2`443 txns, 998`170 bytes, 30m, 31s
davout ah i see, you did get to the "exceedingly lengthy lures" part :D i reluctantly come to the conclusion that i'll *have* to get into lisp at some point in the near future if only to resolve the cognitive dissonance between "this language looks horrible to me" and "these people that i think are very smart seem to have a very good opinion of it"

mircea_popescu i think it's a fine aide for thinking, in the sense that trying to write your problem in lisp will make you understand your problem well / it is impossible to write it in lisp until you understood it well. seems however after you do understand it you are then stuck going back to c and being all bitter about it. which would certainly explain alf's humours. nevertheless, phf DID somehow manage to process respectable quantities of text. if btcbase log hadn't existed i wouldn't even have considered lisp in the first place. so i wonder what exactly is going on here. i guess we find out when they wake up.
davout i suspect it's of the same nature as "if violence doesn't solve your problem, you're not using enough of it". anyway, i'm off, laterz!

mircea_popescu a hundred element list turned into a full tree produces about 25k nodes. that's not a notable item in terms of modern computings. actually the formula is simply n! isn't it. tsk. so the problem rather is, by my count there were 20 words there, which means
mircea_popescu !~calc 20!
jhvh1 mircea_popescu: 20! = 2432902008176640000

mircea_popescu that's a bit much. it can prune these, because it's making a tree not a list of permutations, but even so, i can see what teh problem is.

Quite the read, huh ?

Anyway, the thing I was aiming to do is :

  • Every time the bot is highlighted, it tokenizes the chatline as above. All of these go into the same tree as briefly discussed.
  • Each node in the tree has, other than the word payload, a numeric value associated.
  • Every time the bot hears a line, it selects all full passes through the tree that include at least one word from the line, and indexes them by the product of the node values.
  • Whenever the resulting product is above a certain value, it outputs that line.
  • Whenever two tree passes have the same value, it asks something like "what is [shared trunk] ?"
  • There should also be some skulduggery involved with increasing the values associated to nodes on the basis of the trunk being heard and on the basis of specific "cookie" feedings by humans.

I won't be completing this, because meanwhile I figured out that this design requires significant computing resources which I am not willing to commit. I do still believe it is a reasonable approach to artificial intelligence, as well as the correct model for "language learning" as it takes place in infantsxx. I do still believe lisp is a very reasonable work environment, and I will be releasing the repl bot for public WoT amusement.

I am certainly very much indebted to the esteemed lords who graciously helped me through my three AI days. Thank you!

———
  1. The reference here is, of course,

    WHY YOU WANT RAIL FOR KALASHNIKOV? IS NOT GOOD ENOUGH AS PROCURED FROM IZHEVSK MECHANICAL WORKS? YOU THINK NEEDS IMPROVEMENT? THEN MAYBE YOU FIND JOB WITH ARMY OF RUSSIA! YOU HAVE DRINKS WITH MIKHAIL KALASHNIKOV, TRADE STORY OF MANY WEAPONS DESIGNED AND DETAILS OF SCHOOL FOR ENGINEERING!

    OR MAYBE YOU NOT DO THIS, PROBABLY IS BECAUSE YOU NEVER DESIGN WEAPON IN WHOLE LIFE. YOU LOOK AT FINE RUSSIAN RIFLE, THINK IT NEED CRAZY SHIT STICK ON ALL SIDES OF WEAPON. YOU HAVE DISEASE OF AMERICAN CAPITALIST, CHANGE THING THAT IS FINE FOR NO REASON EXCEPT TO LOOK DIFFERENT FROM COMRADE. YOU PUT CHEAP FLASHLIGHT OF CHINESE SLAVE FACTORY ON ONE SIDE, YOU PUT BAD SCOPE OF AMERICAN MIDDLE WEST ON OTHER SIDE, YOU PUT FRONT PISTOL GRIP ON BOTTOM SO YOU ARE LIKE AMERICAN MOVIE GUY JOHN RAMBO. MAYBE YOU PUT SEX DILDO ON TOP TO FUCK YOURSELF IN ASSHOLE FOR MAKING SHAMEFUL TRAVESTY OF RIFLE OF MIKHAIL KALASHNIKOV, NO?

    RIFLE IS FINE. YOU FUCK IT, IT ONLY GET HEAVY AND YOU STILL NO HIT LARGEST SIDE OF BARN. GO TO FIRING RANGE, PRACTICE WITH MANY MAGAZINE OF CARTRIDGE. THEN YOU NOT NEED DUMB SHIT PUT ON SIDE OF RIFLE.

    As they say, we've decided to try diplomacy.
    []

  2. We did other things, all of us. My three days of AI are doubled by his two days of bot writing and by the previous weeks of trinque's botmaking and so on and so forth. As they say (to Paulinum),

    Inde illa maximi medicorum exclamatio est: uitam breuem esse, longam artem. Inde Aristotelis cum rerum natura exigentis minime conueniens sapienti uiro lis: aetatis illam animalibus tantum indulsisse, ut quina aut dena secula educerent: homini in tam multa ac magna genito tanto citeriorem terminum stare. Non exiguum temporis habemus, sed multum perdidimus. Satis longa uita et in maximarum rerum consummationem: large data est, si tota bene conlocaretur. Sed ubi per luxum ac neglegentiam diffluit, ubi nullae bonae rei inpenditur, ultima demum necessitate cogente, quam ire non intelleximus, transisse sentimus. Ita est, non accipimus breuem uitam, sed facimus, nec inopes eius, sed prodigi sumus. Sicut amplae et regiae opes ubi ad malum dominum peruenerunt, momento dissipantur, at quamuis modicae, si bono custodi traditae sunt, usu crescunt: ita aetas nostra bene disponenti multum patet.

    []

  3. I've removed a lot of spurious REPLing via the chat interface. If you are particularly curious the whole story is available in the #chainstate log. The final code is

    (defpackage :mpbot
      (:use :cl :logbot :drakma) )
    (in-package :mpbot)
    
    (defun subsets (list)
      (if (null list) '(nil)
        (let ((e (car list) )
              (ss (subsets (cdr list) ) ) )
          (append ss (loop for s in ss collect (cons e s) ) ) ) ) )
    
    (defun tree-thingy (items)
      (if items
        (let ((node (cdr (subsets items) ) ) )
          (loop for sub in node
            collect (cons sub
              (tree-thingy (remove-if
           (lambda (a) (member a sub) ) items) ) ) ) )
        nil) )
    
    (defun tree-thingy-string (s)
      (let word-list (remove-duplicates
       (split-sequence:split-sequence #\space s :remove-empty-subseqs t)
       :test #'string-equal) )
       if (> length worldlist 4) (tree-thingy word-list) nil)
    
    (defun brain (target speaker message)
     (format nil "You don't trick me, sly ~A with your ~A lures!" speaker
      (paste (tree-thingy-string (remove-if-not (lambda (a)
       (find a "abcdefghijklmnopqrstuvwxyz ") ) message) )
      )
     )
    )

    and mostly consists of the work of His Lordship the Lord Chancellor ; my own changes are unimportant, more in the vein of scratchmarks left by a young kitten on the graciously provided scratching post.

    I also added some stuff that actually happened in #trilema, for completeness. []

  4. No he's not gay. Some people have taste, what. And plenty of men drink wine. Seriously. []
  5. Yeah, good fucking luck, that is ~totally~ what I'm going to want it to do, something simple and sane like that. Because this is happy land and I really am a kitteh. []
  6. At the time His Lordship the Lord Admiral had just introduced a whole new line of cannons resulting in slightly stormy seas. []
  7. Consider that it took him the holy 20 minutes to solve this problem and you're well on your way of understanding why the guy's such a famous lisper. []
  8. This unresolved reference is pending resolution. Meanwhile it was resolved. []
  9. Took me two days to be confused by the same thing, briefly attempted to fix, gave up. []
  10. This goes for you too, dear leader. I mean reader. Can you figure out what I aim to do, preferably before you read it at the end of the article ? []
  11. (defun replace-all (string part replacement &key (ignore-case nil) )
      (if (string= part "")
          string
          (with-output-to-string (out)
            (loop with part-length = (length part)
                  for old-pos = 0 then (+ pos part-length)
                  for pos = (search part string
                                    :start2 old-pos
                                    :test (if ignore-case #'char-equal #'char=) )
                  do (write-string string out
                                   :start old-pos
                                   :end (or pos (length string) ) )
                  when pos do (write-string replacement out)
                  while pos) ) ) )

    []

  12. Most memorably, Naggum's. []
  13. I do believe there's no better way to teach programming, especially to someone very new who'll need a lot of help, than setting up an irc bot repl. For serious. []
  14. This probably works acceptably well if the two are collaborating, but I'm damned sure nobody learned to code this way, because they can't, because it's insane. []
  15. (defun mp-split (s &optional words)
      (let ((next-delimiter (search " " s) ) )
       (if next-delimiter
         (progn
           (mp-split (subseq s (+ 1 next-delimiter) )
            (cons (subseq s 0 next-delimiter) words) ) )
         (reverse words) ) ) )

    []

  16. The darkness is growing. []
  17. They're trolling me softly. With their words. []
  18. Yes, a novel discourse format creates a novel flavour of civilisation. []
  19. The let's break it line is timestamped 10:32:59 ; the timeout is timestamped 10:37:40. That's a 41 second differential during which the thing churned. []
  20. Incidentally a fine approach to estimate the volume of work done by the human -- as opposed to dragonfly -- brain : if Trilema's ~20 million words were as they are set out in a million sentences, then you'd be looking at about a million iterations of that 2 1018 nodes processing into one humongo tree. There aren't yet man made computers capable of handling this immense load, much like there aren't yet man made engines capable of powering a dragonfly's day out of the two calories its diet provides.

    And no, it makes no difference for the purposes of this discussion that it's Trilema as opposed to someone yakking on TV. All infantile brains learn any language, irrespective of their parents' culture, genetics etcetera, on the strict basis of spending years doing the above tree parsing, over however many million sentences you can churn at them. How a hundred billion neurons manage to process and store millions of exanodes is anyone's guess, and far far far outside the scope of this humble article. []

Comments feed : RSS 2.0. Leave your own comment below, or send a trackback.

4 Responses

  1. [...] security benefits of the anointed item (as well as the slightly dog-eared corners) aside, it got heavy, resting precariously on the original hinges intended for the original item. That atrocity behind [...]

  2. [...] constituting the gap between realia and idealia are indeed so very large no serious approach is even remotely possible. When trying to smush an eight that meanwhile metastasized into thousands of digits such that it [...]

  3. [...] to have good arms and armor about himself at court, and to take special care to avoid and forbid "toilsome" weapons and "traiterous defensiue" armor, like "plate-sleeues and such-like unseen" pieces. The old Scots [...]

  4. [...] the computers, there's not enough lifespan in the universe to debug the involved software, there's nothing, forget about it, buncha Haskellite brainrotted zombies! ———A lesser problem [...]

Add your cents! »
    If this is your first comment, it will wait to be approved. This usually takes a few hours. Subsequent comments are not delayed.