2016-06-17T00:03:06Z IPmonger quit (Ping timeout: 246 seconds) 2016-06-17T00:04:32Z therik joined #lisp 2016-06-17T00:04:47Z therik: is there something wrong with this line? (format *client* "~a#~a" (length json-string) json-string) 2016-06-17T00:05:27Z therik: *client* is # from iolib and json-string is "20#{\"message\":\"testik\"}" 2016-06-17T00:05:56Z jasom: looks fine, though I suppose you want json-string to not start with 20# 2016-06-17T00:06:23Z jasom: also if you use the format "~d:~a," you can use netstrings to read it from json 2016-06-17T00:06:24Z therik: eeh, the lib in nodejs expects that 2016-06-17T00:07:13Z jasom: e.g. https://www.npmjs.com/package/netstring-stream\ 2016-06-17T00:07:24Z jasom: therik: right, but your format is going to prepend 20# for you, right? 2016-06-17T00:07:25Z zdm quit (Ping timeout: 244 seconds) 2016-06-17T00:07:56Z Petit_Dejeuner quit (Ping timeout: 244 seconds) 2016-06-17T00:08:00Z zdm joined #lisp 2016-06-17T00:08:06Z jasom: you'll end up with 23#20#{"message":"testik"} if you're doing what you say 2016-06-17T00:09:00Z therik: jasom, ah, I see, no, I actually copy pasted wrong string... json-string is "{\"message\":\"testik\"}", but it should prepend that 20# 2016-06-17T00:10:23Z jasom: right, in that case what you posted looks fine, but you should use ~d rather than ~a to force decimal output 2016-06-17T00:10:30Z jasom: ~a will use whatever the curent print base is 2016-06-17T00:10:52Z therik: weird thing is, (format *client* "20#{\"message\":\"textik\"}") works fine, but (format *client* "~d#~a" (length "{\"message\":\"testik\"}") "{\"message\":\"testik\"}") throws Error (TYPE-ERROR) during printing: # 2016-06-17T00:12:08Z jasom: therik: backtrace? 2016-06-17T00:12:31Z therik: and if I swap *client* for t, it works fine too... I am also getting reliable memory fault on that spot... 2016-06-17T00:15:03Z therik: jasom: http://paste.lisp.org/display/318525 2016-06-17T00:15:52Z jasom: sorry, I gotta go 2016-06-17T00:16:04Z ASau quit (Ping timeout: 252 seconds) 2016-06-17T00:16:14Z therik: no prob, I should go too 2016-06-17T00:16:22Z therik: 3:10 in the morning here 2016-06-17T00:17:10Z jasom: but that looks like a bug in iolib to me 2016-06-17T00:19:01Z Petit_Dejeuner joined #lisp 2016-06-17T00:23:06Z therik: ok, I "fixed" it... (let ((val (format nil "~d#~a" 20 "{\"message\":\"testik\"}"))) (format *client* val)) 2016-06-17T00:23:26Z therik: it's strange that this works, maybe some timing issue 2016-06-17T00:24:33Z DeadTrickster joined #lisp 2016-06-17T00:28:05Z wccoder quit (Remote host closed the connection) 2016-06-17T00:30:23Z sz0 quit (Quit: Connection closed for inactivity) 2016-06-17T00:36:49Z sweater quit (Read error: Connection reset by peer) 2016-06-17T00:39:02Z Kaisyu quit (Quit: ERC Version 5.3 (IRC client for Emacs)) 2016-06-17T00:40:13Z al-damiri quit (Quit: Connection closed for inactivity) 2016-06-17T00:43:36Z Kaisyu joined #lisp 2016-06-17T00:43:36Z TCZ joined #lisp 2016-06-17T00:48:03Z IPmonger joined #lisp 2016-06-17T00:49:10Z TCZ quit (Quit: Leaving) 2016-06-17T00:52:36Z IPmonger quit (Ping timeout: 258 seconds) 2016-06-17T00:54:01Z EvW quit (Ping timeout: 250 seconds) 2016-06-17T00:55:42Z xenopragma quit (Quit: Leaving) 2016-06-17T00:55:53Z IPmonger joined #lisp 2016-06-17T00:56:48Z shdeng joined #lisp 2016-06-17T00:57:16Z mastokley quit (Ping timeout: 250 seconds) 2016-06-17T00:57:50Z arescorpio joined #lisp 2016-06-17T00:59:03Z mastokley joined #lisp 2016-06-17T01:00:30Z IPmonger quit (Ping timeout: 260 seconds) 2016-06-17T01:03:57Z grimsley quit (Quit: Leaving) 2016-06-17T01:16:13Z lemoinem joined #lisp 2016-06-17T01:16:46Z waaron quit (Ping timeout: 250 seconds) 2016-06-17T01:16:54Z IPmonger joined #lisp 2016-06-17T01:21:06Z pllx joined #lisp 2016-06-17T01:21:09Z IPmonger quit (Ping timeout: 246 seconds) 2016-06-17T01:21:40Z fkac joined #lisp 2016-06-17T01:22:10Z IPmonger joined #lisp 2016-06-17T01:23:41Z edgar-rft quit (Quit: edgar-rft) 2016-06-17T01:26:11Z IPmonger quit (Ping timeout: 240 seconds) 2016-06-17T01:28:17Z jokleinn quit (Quit: WeeChat 1.5) 2016-06-17T01:28:37Z wccoder joined #lisp 2016-06-17T01:32:38Z CEnnis91 joined #lisp 2016-06-17T01:32:40Z kushal joined #lisp 2016-06-17T01:33:14Z wccoder quit (Ping timeout: 258 seconds) 2016-06-17T01:34:28Z pllx quit (Quit: zz) 2016-06-17T01:36:22Z mastokley quit (Ping timeout: 252 seconds) 2016-06-17T01:38:47Z kolko joined #lisp 2016-06-17T01:42:51Z Xal joined #lisp 2016-06-17T01:48:28Z fluter quit (Ping timeout: 264 seconds) 2016-06-17T01:49:22Z Xal quit (Quit: WeeChat 1.5) 2016-06-17T01:49:42Z Xal joined #lisp 2016-06-17T01:52:16Z Xal quit (Client Quit) 2016-06-17T01:52:39Z Xal joined #lisp 2016-06-17T01:53:24Z Xal quit (Client Quit) 2016-06-17T01:54:09Z fluter joined #lisp 2016-06-17T01:55:26Z Xal joined #lisp 2016-06-17T01:56:06Z papachan quit (Ping timeout: 244 seconds) 2016-06-17T02:02:29Z unrahul quit (Quit: Connection closed for inactivity) 2016-06-17T02:08:30Z fluter quit (Ping timeout: 258 seconds) 2016-06-17T02:10:06Z asc232 joined #lisp 2016-06-17T02:15:10Z zdm quit (Ping timeout: 260 seconds) 2016-06-17T02:20:45Z mastokley joined #lisp 2016-06-17T02:21:04Z vlnx quit (Quit: leaving) 2016-06-17T02:25:44Z space_otter joined #lisp 2016-06-17T02:33:02Z axion: ' 2016-06-17T02:38:16Z asc232 quit (Remote host closed the connection) 2016-06-17T02:38:28Z clop joined #lisp 2016-06-17T02:40:57Z jleija joined #lisp 2016-06-17T02:43:29Z clop quit (Quit: Leaving) 2016-06-17T02:48:18Z linoge joined #lisp 2016-06-17T02:50:52Z linoge: I want to test out Lisp for web app development. Any advice? I've read about ucw and weblocks. I want to do a page that exposes a REST API but can also be usable from a web browser in a traditional fashion 2016-06-17T02:51:58Z clop joined #lisp 2016-06-17T02:52:29Z clop quit (Client Quit) 2016-06-17T02:52:53Z clop joined #lisp 2016-06-17T02:54:48Z adolf_stalin quit (Remote host closed the connection) 2016-06-17T02:54:49Z test1600 joined #lisp 2016-06-17T02:55:23Z nowolfer joined #lisp 2016-06-17T02:55:55Z jasom: linoge: I personally use clack directly. Hunchentoot is probably the easiest to get started though, and there are plenty of guides. 2016-06-17T02:56:33Z jasom: and it's perfectly good for implementing a REST API, you define functions and tell hunchentoot which paths to route to it. 2016-06-17T02:57:07Z micro`_ is now known as micro` 2016-06-17T03:00:40Z DeadTrickster: jasom, how you handle authentication/authorization and content negotiation, also versioning? 2016-06-17T03:01:07Z zdm joined #lisp 2016-06-17T03:02:44Z clop quit (Quit: This computer has gone to sleep) 2016-06-17T03:03:32Z linoge: Well I was kinda attracted by the number of things I'm to learn using the both I mentioned above. However, I also though of using something more "low-leve" 2016-06-17T03:03:36Z linoge: *"low-leve" 2016-06-17T03:03:48Z nowolfer quit (Ping timeout: 250 seconds) 2016-06-17T03:03:49Z linoge: Holy, am I not able to write "level" properly x)? 2016-06-17T03:05:33Z PuercoPop: DeadTrickster: I doubt there is something for content negotiation in Lisp out there, maybe mmontone's cl-rest-server? 2016-06-17T03:05:56Z PuercoPop: let alone versioning (you mean in the http headers right? 2016-06-17T03:05:57Z asc232 joined #lisp 2016-06-17T03:06:04Z DeadTrickster: PuercoPop, yeah, looked into that. still not convinced though 2016-06-17T03:06:12Z DeadTrickster quit (Quit: Leaving) 2016-06-17T03:06:32Z DeadTrickster joined #lisp 2016-06-17T03:06:57Z DeadTrickster: it's like whenever I seed routes declared alongside handlers I vomit ) 2016-06-17T03:08:55Z PuercoPop: yeah, in that regard the lisp web-dev camp has a long way to go (although there is potential) 2016-06-17T03:09:16Z nowolfer joined #lisp 2016-06-17T03:09:52Z PuercoPop: There is a CLOS to REST router in the spirit of tasty-pie as well https://github.com/joaotavora/snooze 2016-06-17T03:10:13Z IPmonger joined #lisp 2016-06-17T03:10:25Z PuercoPop: it handle's content negotiation but not versioning and it limits your routes 2016-06-17T03:11:16Z PuercoPop: (or is opinionated about how your routes should be named :D) 2016-06-17T03:11:40Z DeadTrickster: that's the thing 2016-06-17T03:12:03Z DeadTrickster: REST can be defined with flow graphs (look at cowboy webmachine) 2016-06-17T03:12:20Z DeadTrickster: I see none of this for CL, just tons of macrology 2016-06-17T03:12:47Z DeadTrickster: like 'hey I can define syntax for this and that' 2016-06-17T03:13:04Z DeadTrickster: now show me your oauth2 protected server ) 2016-06-17T03:14:56Z IPmonger quit (Ping timeout: 272 seconds) 2016-06-17T03:15:51Z linoge: Snooze seems quite interesting, I'm, by some reason, not fond of declaring routes with annotations (seems to be the approach in caveman/ningle/lucerne) 2016-06-17T03:16:04Z linoge: Might be that there's some better argument than me not feeling right about it. 2016-06-17T03:17:36Z PuercoPop: linoge: for routes check either cl-handlers or pavel's router/microframework 2016-06-17T03:17:37Z PuercoPop: sec 2016-06-17T03:18:13Z PuercoPop: https://github.com/pvlpenev/nethil (Handler's and routes are decoupled here) 2016-06-17T03:18:55Z PuercoPop: https://github.com/Inaimathi/cl-handlers and a similar idea 2016-06-17T03:23:51Z ahungry: in caveman you can use defroute instead of the cl-annot stuff 2016-06-17T03:24:31Z adolf_stalin joined #lisp 2016-06-17T03:24:35Z PuercoPop: linoge: also you use trivia/optima to match clack's http requests directly jasom does that iirc 2016-06-17T03:27:12Z zdm quit 2016-06-17T03:27:38Z zdm joined #lisp 2016-06-17T03:28:03Z linoge: I see : D. Well, I'll take that into account. What's the general opinion on continuations nowadays? I think I read that they don't make a lot of sense for REST, but could be of use to the traditional side browser centered (there must be a better name for it) style from what I've read :O 2016-06-17T03:28:18Z linoge: *REST APIs 2016-06-17T03:34:08Z Harag quit (Remote host closed the connection) 2016-06-17T03:34:11Z Harag1 joined #lisp 2016-06-17T03:36:31Z Harag1 is now known as Harag 2016-06-17T03:42:34Z leo_song quit (Excess Flood) 2016-06-17T03:42:53Z leo_song joined #lisp 2016-06-17T03:45:56Z fkac quit (Remote host closed the connection) 2016-06-17T03:46:33Z CEnnis91 quit (Quit: Connection closed for inactivity) 2016-06-17T03:46:47Z jasom: linoge: it doesn't help that CL lacks first-class continuations, but if you are willing to encapsulate your state manually, they can work quite well. 2016-06-17T03:47:54Z qubitnerd joined #lisp 2016-06-17T03:51:09Z linoge: I see, well, I'll try to investigate everything further :). But I have this feeling that I'm going to have a great experience with building web stuff with lisp :) 2016-06-17T03:51:44Z jasom: linoge: they also make for wicked-fast prototyping, but I know larger sites move away from them as it is hard manage resources on high-traffic sites (when every link calls a continuation, you need to store a continuation for every link that anybody might possible click on) 2016-06-17T03:54:36Z schoppenhauer quit (Ping timeout: 276 seconds) 2016-06-17T03:55:07Z linoge: I read about that on... well, a mail conversation linked from UCW webpage I think. 2016-06-17T03:55:40Z linoge: But it was not clear to me at the end if it was possible to improve the resource usage :/ 2016-06-17T03:55:53Z schoppenhauer joined #lisp 2016-06-17T03:58:42Z linoge: That would equally apply if CL had first class continuations? 2016-06-17T03:58:47Z jasom: The other issue is that it's best if your state is stored in the DB rather than the application 2016-06-17T03:59:16Z jasom: linoge: yeah, you're always storing things whether it's implicit or explicit. 2016-06-17T03:59:43Z vlnx joined #lisp 2016-06-17T03:59:50Z jasom: and honestly, closures give you plenty of flexibility, without complicating your code too much if you do it right; or you can go the weblocks route and use cl-cont. 2016-06-17T04:02:11Z linoge: But cl-cont would leave me storing continuations right? 2016-06-17T04:03:02Z jasom: yup 2016-06-17T04:03:33Z jasom: either way it's continuations. first-class continuations lets you avoid having to structure your code with explicit continuations (think about javascript continuations for an example) 2016-06-17T04:04:39Z nowolfer quit (Ping timeout: 258 seconds) 2016-06-17T04:05:45Z linoge: I see, in that case I might want to avoid using them as after this test I might get onto doing something which might be used widely :/ 2016-06-17T04:06:32Z jasom: yeah. You can do it just fine the old-fashioned way. 2016-06-17T04:07:39Z linoge: Yup, however, it might be interesting as a learning exercise to do it both ways c: 2016-06-17T04:08:48Z mastokley quit (Ping timeout: 246 seconds) 2016-06-17T04:09:46Z shka joined #lisp 2016-06-17T04:10:44Z jasom: yup; the whole continuation thing is pretty slick, just associate a lambda with a securely generated random value, and then look it up in the hash table when the URL is called, and call the function. 2016-06-17T04:12:40Z tmtwd joined #lisp 2016-06-17T04:14:06Z xantoz quit (Quit: WeeChat 1.1.1) 2016-06-17T04:14:42Z linoge: Well, I'm most thankful for the aid :). I think the best way then is to test and see what I can get working ^^. I'll make sure to document my advances c: 2016-06-17T04:19:02Z jleija quit (Quit: leaving) 2016-06-17T04:19:23Z fluter joined #lisp 2016-06-17T04:26:39Z mbuf joined #lisp 2016-06-17T04:26:42Z vlatkoB joined #lisp 2016-06-17T04:28:20Z minion quit (Disconnected by services) 2016-06-17T04:28:23Z minion joined #lisp 2016-06-17T04:30:06Z adolf_stalin quit (Remote host closed the connection) 2016-06-17T04:31:26Z DougNYC quit 2016-06-17T04:49:04Z fluter quit (Ping timeout: 264 seconds) 2016-06-17T04:49:38Z Oladon: Hrm 2016-06-17T04:49:51Z Zhivago: Indeed. 2016-06-17T04:50:19Z Oladon: I'm attempting a code golf in CL. I don't think it's going so well. :) 2016-06-17T04:50:40Z jasom: ah 2016-06-17T04:55:51Z ramky joined #lisp 2016-06-17T04:56:13Z Harag quit (Remote host closed the connection) 2016-06-17T04:56:28Z Harag1 joined #lisp 2016-06-17T04:58:13Z dmiles quit (Read error: Connection reset by peer) 2016-06-17T04:58:27Z IPmonger joined #lisp 2016-06-17T04:58:29Z Harag1 is now known as Harag 2016-06-17T05:02:45Z IPmonger quit (Ping timeout: 250 seconds) 2016-06-17T05:07:54Z Zhivago: Stupid (reader) macros FTW. 2016-06-17T05:08:38Z dmiles joined #lisp 2016-06-17T05:09:44Z mejja joined #lisp 2016-06-17T05:11:40Z sauvin joined #lisp 2016-06-17T05:13:02Z mastokley joined #lisp 2016-06-17T05:14:33Z pierpa` quit (Ping timeout: 240 seconds) 2016-06-17T05:15:20Z linoge: Gods be good, I didn't know such a thing existed x). Lisp is truly awesome : O 2016-06-17T05:15:49Z mrcom quit (Quit: This computer has gone to sleep) 2016-06-17T05:17:42Z bigfondue quit (Ping timeout: 250 seconds) 2016-06-17T05:18:58Z Xal quit (Quit: WeeChat 1.5) 2016-06-17T05:20:10Z arescorpio quit (Quit: Leaving.) 2016-06-17T05:25:14Z wccoder joined #lisp 2016-06-17T05:29:28Z wccoder quit (Ping timeout: 244 seconds) 2016-06-17T05:29:52Z linoge quit (Ping timeout: 264 seconds) 2016-06-17T05:32:25Z fluter joined #lisp 2016-06-17T05:36:06Z emaczen joined #lisp 2016-06-17T05:37:07Z grouzen joined #lisp 2016-06-17T05:40:09Z schaueho joined #lisp 2016-06-17T05:42:12Z fiddlerwoaroof_: linoge: ningle also doesn't require annotations, you just do (setf (route "/foo") (lambda (params) ...))) 2016-06-17T05:46:00Z mishoo joined #lisp 2016-06-17T05:50:37Z jasom: if only # were a terminating macro character I'd save like 10 bytes 2016-06-17T05:55:35Z ecraven: hm.. apl must be excellent for code golf :) 2016-06-17T05:57:54Z yeticry quit (Quit: leaving) 2016-06-17T05:58:45Z qubitnerd quit (Ping timeout: 244 seconds) 2016-06-17T05:59:42Z qubitnerd joined #lisp 2016-06-17T06:06:06Z nowolfer joined #lisp 2016-06-17T06:09:48Z mastokley quit (Ping timeout: 276 seconds) 2016-06-17T06:11:24Z nzambe quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 2016-06-17T06:12:50Z allezbluez joined #lisp 2016-06-17T06:12:50Z allezbluez quit (Changing host) 2016-06-17T06:12:50Z allezbluez joined #lisp 2016-06-17T06:15:19Z DeadTrickster quit (Ping timeout: 250 seconds) 2016-06-17T06:18:03Z MrWoohoo quit (Ping timeout: 244 seconds) 2016-06-17T06:21:20Z zdm quit (Ping timeout: 260 seconds) 2016-06-17T06:22:48Z tmtwd quit (Ping timeout: 276 seconds) 2016-06-17T06:31:18Z Grue`` quit (Ping timeout: 244 seconds) 2016-06-17T06:32:01Z stepnem joined #lisp 2016-06-17T06:37:57Z asc232 quit (Quit: Saliendo) 2016-06-17T06:41:59Z ramky quit (Ping timeout: 250 seconds) 2016-06-17T06:42:18Z schaueho quit (Ping timeout: 276 seconds) 2016-06-17T06:45:47Z FreeBirdLjj joined #lisp 2016-06-17T06:48:15Z fridim_ joined #lisp 2016-06-17T06:50:34Z IPmonger joined #lisp 2016-06-17T06:52:06Z flamebeard joined #lisp 2016-06-17T06:53:56Z MoALTz joined #lisp 2016-06-17T06:54:21Z mejja: line noise i'm told is on top of the golfing hill;) 2016-06-17T06:55:11Z IPmonger quit (Ping timeout: 250 seconds) 2016-06-17T06:55:49Z ramky joined #lisp 2016-06-17T06:55:56Z DavidGuru joined #lisp 2016-06-17T06:56:53Z kushal quit (Quit: Leaving) 2016-06-17T07:05:19Z angavrilov joined #lisp 2016-06-17T07:07:27Z peey joined #lisp 2016-06-17T07:16:48Z jasom: (list 0) is the shortest way to make a mutable cons with the car of 0 (I don't care what the cdr is)? 2016-06-17T07:17:17Z Harag quit (Ping timeout: 250 seconds) 2016-06-17T07:20:29Z mejja: (cons 0 nil) ?? 2016-06-17T07:20:57Z jasom: mejja: shortest in characters (still on code golf) 2016-06-17T07:21:23Z mejja: Aha... line noise ftw! 2016-06-17T07:24:30Z mvilleneuve joined #lisp 2016-06-17T07:27:16Z FreeBirdLjj quit (Remote host closed the connection) 2016-06-17T07:27:55Z FreeBirdLjj joined #lisp 2016-06-17T07:28:16Z qubitnerd quit (Ping timeout: 272 seconds) 2016-06-17T07:31:09Z qubitnerd joined #lisp 2016-06-17T07:34:29Z Harag joined #lisp 2016-06-17T07:35:34Z attila_lendvai joined #lisp 2016-06-17T07:35:34Z attila_lendvai quit (Changing host) 2016-06-17T07:35:34Z attila_lendvai joined #lisp 2016-06-17T07:43:24Z scymtym joined #lisp 2016-06-17T07:47:21Z CYW joined #lisp 2016-06-17T07:56:21Z HeyFlash joined #lisp 2016-06-17T07:56:56Z space_otter quit (Remote host closed the connection) 2016-06-17T07:57:11Z keltvek joined #lisp 2016-06-17T07:57:11Z sz0 joined #lisp 2016-06-17T08:01:43Z emaczen quit (Ping timeout: 244 seconds) 2016-06-17T08:06:54Z CYW quit (Quit: Textual IRC Client: www.textualapp.com) 2016-06-17T08:17:02Z MrWoohoo joined #lisp 2016-06-17T08:21:01Z NhanH quit (Ping timeout: 244 seconds) 2016-06-17T08:21:44Z kolko quit (Quit: ZNC - http://znc.in) 2016-06-17T08:22:21Z kolko joined #lisp 2016-06-17T08:22:34Z Framedragger quit (Ping timeout: 244 seconds) 2016-06-17T08:23:04Z nowolfer_ joined #lisp 2016-06-17T08:23:05Z micro` quit (Ping timeout: 244 seconds) 2016-06-17T08:23:05Z tristero quit (Ping timeout: 244 seconds) 2016-06-17T08:23:05Z norfumpit quit (Ping timeout: 244 seconds) 2016-06-17T08:23:22Z nowolfer quit (Ping timeout: 272 seconds) 2016-06-17T08:23:32Z Framedragger joined #lisp 2016-06-17T08:23:39Z NhanH joined #lisp 2016-06-17T08:23:56Z micro` joined #lisp 2016-06-17T08:23:59Z ineiros quit (Remote host closed the connection) 2016-06-17T08:24:05Z ineiros joined #lisp 2016-06-17T08:24:24Z micro` is now known as Guest28872 2016-06-17T08:25:28Z norfumpit joined #lisp 2016-06-17T08:25:35Z getha quit (Ping timeout: 260 seconds) 2016-06-17T08:29:06Z arbv joined #lisp 2016-06-17T08:30:31Z rm34D` quit (Remote host closed the connection) 2016-06-17T08:30:47Z rm34D` joined #lisp 2016-06-17T08:32:27Z peterh joined #lisp 2016-06-17T08:32:49Z PuercoPop: To allocate the char foo[4096] i'm using cffi:with-foreign-object (foo :char 4096) ..., to access the elements of each array I have to use forieng-aref? if so what goes in the array type? '(:char 4096)? 2016-06-17T08:35:02Z smokeink joined #lisp 2016-06-17T08:35:07Z xrash quit (Remote host closed the connection) 2016-06-17T08:36:05Z octo- quit (Ping timeout: 260 seconds) 2016-06-17T08:36:41Z finnrobi_ joined #lisp 2016-06-17T08:38:00Z j0ni_ quit (Ping timeout: 276 seconds) 2016-06-17T08:38:03Z jdz: PuercoPop: maybe cffi:mem-aref? 2016-06-17T08:38:04Z octo_ joined #lisp 2016-06-17T08:38:04Z My_Hearing joined #lisp 2016-06-17T08:38:14Z funnel_ joined #lisp 2016-06-17T08:38:32Z j0ni joined #lisp 2016-06-17T08:38:39Z harish_ quit (Ping timeout: 276 seconds) 2016-06-17T08:38:52Z jdz: PuercoPop: there's some non-trivial cffi code i got working long time ago here: https://bitbucket.org/jdzerins/evp/src/f454684f057a02bde546ca0254c1c012ad7eae49/evp.lisp?fileviewer=file-view-default 2016-06-17T08:39:06Z araujo joined #lisp 2016-06-17T08:39:52Z araujo quit (Max SendQ exceeded) 2016-06-17T08:40:40Z smokeink quit (Ping timeout: 264 seconds) 2016-06-17T08:41:02Z peterh quit (Ping timeout: 258 seconds) 2016-06-17T08:41:15Z setheus quit (Ping timeout: 276 seconds) 2016-06-17T08:41:27Z peterh joined #lisp 2016-06-17T08:41:53Z reepca joined #lisp 2016-06-17T08:42:05Z PuercoPop: jdz: thanks, yeah mem-ref seems what I'm looking for 2016-06-17T08:42:14Z reepca: is there a way to get the declared type of a variable? 2016-06-17T08:42:31Z setheus joined #lisp 2016-06-17T08:42:33Z shifty quit (Ping timeout: 276 seconds) 2016-06-17T08:42:47Z funnel quit (Ping timeout: 240 seconds) 2016-06-17T08:42:47Z Mon_Ouie quit (Ping timeout: 240 seconds) 2016-06-17T08:42:49Z vap1 quit (Ping timeout: 240 seconds) 2016-06-17T08:42:49Z mbuf quit (Ping timeout: 240 seconds) 2016-06-17T08:42:49Z AeroNotix quit (Ping timeout: 240 seconds) 2016-06-17T08:42:49Z vaporatorius joined #lisp 2016-06-17T08:42:49Z vaporatorius quit (Changing host) 2016-06-17T08:42:49Z vaporatorius joined #lisp 2016-06-17T08:42:50Z funnel_ is now known as funnel 2016-06-17T08:42:55Z araujo joined #lisp 2016-06-17T08:42:58Z ksool quit (Remote host closed the connection) 2016-06-17T08:43:06Z finnrobi quit (Ping timeout: 252 seconds) 2016-06-17T08:43:06Z Firedancer quit (Ping timeout: 252 seconds) 2016-06-17T08:43:07Z krypt_ quit (Ping timeout: 252 seconds) 2016-06-17T08:43:12Z Fade quit (Ping timeout: 276 seconds) 2016-06-17T08:43:30Z PuercoPop: reepca: (type-of foo) 2016-06-17T08:43:31Z PuercoPop: ? 2016-06-17T08:43:32Z Firedancer joined #lisp 2016-06-17T08:43:52Z Fade joined #lisp 2016-06-17T08:43:59Z reepca: that gives the type of the object, not the variable 2016-06-17T08:44:01Z shifty joined #lisp 2016-06-17T08:44:17Z reepca: doesn't it? 2016-06-17T08:44:32Z krypt joined #lisp 2016-06-17T08:44:34Z harish_ joined #lisp 2016-06-17T08:44:41Z PuercoPop: variables/places have no type, objects have 2016-06-17T08:44:55Z reepca: but they can have a declared type 2016-06-17T08:45:03Z AntiSpamMeta quit (Quit: Automatic restart triggered due to persistent lag. Freenode staff: If this is happening too frequently, please set a nickserv freeze on my account, and once my connection is stable, unfreeze the account and /kill me to trigger a reconnect.) 2016-06-17T08:45:53Z AntiSpamMeta joined #lisp 2016-06-17T08:46:20Z AeroNotix joined #lisp 2016-06-17T08:46:24Z asedeno quit (Ping timeout: 258 seconds) 2016-06-17T08:46:35Z reepca: and DESCRIBE can print it 2016-06-17T08:47:20Z ksool joined #lisp 2016-06-17T08:47:34Z asedeno joined #lisp 2016-06-17T08:47:51Z freehck quit (Remote host closed the connection) 2016-06-17T08:48:07Z reepca: (defvar *test* 2) (declaim (type integer *test*)) (describe '*test*) => ... Declared type: INTEGER ... 2016-06-17T08:48:29Z smokeink joined #lisp 2016-06-17T08:49:20Z therik: guys, I'm getting strange error when I eval (format *client* "~d#~a" 20 "{\"message\":\"testik\"}"), yet no error when I eval (format *client* "20#{\"message\":\"testik\"}") 2016-06-17T08:49:39Z therik: here's a trace http://paste.lisp.org/display/318548 2016-06-17T08:50:00Z PuercoPop: reepca: describe is implementation specific as is how the compiler treats declare expressions, it may treat it as something to verify for examples. There may be an implementation specific way to get the information you want 2016-06-17T08:50:24Z tristero joined #lisp 2016-06-17T08:51:04Z reepca: if nothing else, one technically could parse through the output of describe on sbcl looking for the declared type I suppose 2016-06-17T08:52:21Z qubitnerd quit (Ping timeout: 244 seconds) 2016-06-17T08:57:48Z jasom: PuercoPop: important note: with-foreign-object stack allocates, so you just used 4k of stack with that 2016-06-17T08:58:03Z Karl_Dscc joined #lisp 2016-06-17T08:59:34Z jasom: PuercoPop: https://github.com/jasom/mymongrel2/blob/master/mymongrel2.lisp#L49 <-- using unwind protect to heap allocate 2016-06-17T08:59:41Z jasom should probably make that into a macro 2016-06-17T09:01:53Z kushal joined #lisp 2016-06-17T09:03:41Z PuercoPop: jasom: I'm using that idiom to close another object alocated foreign-alloc, but I assumed the with-foreign-object taked care of removing freeing the resource. 2016-06-17T09:04:04Z jasom: PuercoPop: it takes care of freeing the resource, but it may do so by stack allocating 2016-06-17T09:04:14Z jasom: so you ought not use with-foreign-object for large opjects 2016-06-17T09:04:59Z PuercoPop: so you are saying that to free the resource it may allocate new memory as well? (Sorry kinda of sleepy) 2016-06-17T09:05:13Z jasom: (with-foreign-object (foo :char 10000000)(something-to-fill-up foo)) <-- this will crash your program 2016-06-17T09:06:01Z PuercoPop: ah you are saying I should be wary of stacck allocation because I can get a heap exhaustion 2016-06-17T09:06:15Z jasom: you won't get heap exhaustion because it's not allocated on the heap 2016-06-17T09:06:18Z jasom: it's allocated on the C stack 2016-06-17T09:07:37Z jasom: it would be like the C code "void foo(){char c[1000000000]; ...}" 2016-06-17T09:08:17Z kobain quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2016-06-17T09:08:31Z jasom: and for all the times I've said "is" it's actually "may be, but definitely is on sbcl on x86oids" 2016-06-17T09:09:12Z PuercoPop: ahh ok, I think I see what you are saying. I'm not using this in a function that is going to be called multiple times but in the 'main' function. 2016-06-17T09:09:31Z nowolfer_ quit (Ping timeout: 250 seconds) 2016-06-17T09:09:53Z jasom: PuercoPop: 4k is probably okay; I don't know what sbcl defaults thread's stack sizes to. Just be aware of it. 2016-06-17T09:09:59Z PuercoPop: I need a char* because that is how libvorbis returns the samples 2016-06-17T09:10:05Z jasom: right 2016-06-17T09:10:10Z PuercoPop: I could read it in smaller increments 2016-06-17T09:10:36Z PuercoPop: if I run into trouble 2016-06-17T09:10:54Z mejja quit (Quit: \ No newline at end of file) 2016-06-17T09:11:05Z jasom: 2MB is the default stack size so you're probably okay with 4k 2016-06-17T09:11:38Z reepca: Can anything be (portably) done with environment objects besides passing them to stuff like macroexpand? 2016-06-17T09:11:42Z jasom: I had a 1MB buffer this way and crashed my program, which is how I learned that with-foreign-object can stack allocate 2016-06-17T09:11:46Z jasom: reepca: nope 2016-06-17T09:11:55Z reepca: well at least I know now 2016-06-17T09:12:08Z edgar-rft joined #lisp 2016-06-17T09:13:07Z jasom: reepca: there are so many ways to implement environments that it would have really restricted implementations if the standard required otherwise. 2016-06-17T09:13:36Z scymtym_ joined #lisp 2016-06-17T09:14:54Z lieven: there was an environments proposal in CLtL2. the committee just ran out of time|money before they got to it. 2016-06-17T09:15:45Z scymtym quit (Ping timeout: 260 seconds) 2016-06-17T09:22:13Z Karl_Dscc quit (Remote host closed the connection) 2016-06-17T09:24:24Z mbuf joined #lisp 2016-06-17T09:25:18Z nowolfer joined #lisp 2016-06-17T09:26:59Z wccoder joined #lisp 2016-06-17T09:27:57Z allezrouge joined #lisp 2016-06-17T09:30:11Z allezbluez quit (Ping timeout: 240 seconds) 2016-06-17T09:31:17Z moore33 joined #lisp 2016-06-17T09:31:46Z wccoder quit (Ping timeout: 272 seconds) 2016-06-17T09:36:34Z hhdave joined #lisp 2016-06-17T09:37:06Z defaultxr quit (Ping timeout: 246 seconds) 2016-06-17T09:37:11Z keltvek quit (Ping timeout: 240 seconds) 2016-06-17T09:37:17Z sausages quit (Quit: leaving) 2016-06-17T09:37:19Z allezrouge is now known as allezbluez 2016-06-17T09:37:38Z allezbluez quit (Changing host) 2016-06-17T09:37:38Z allezbluez joined #lisp 2016-06-17T09:38:08Z allezbluez is now known as allezbluez1 2016-06-17T09:39:10Z allezbluez1 is now known as allezbluez 2016-06-17T09:40:10Z keltvek joined #lisp 2016-06-17T09:41:10Z peey quit (Ping timeout: 250 seconds) 2016-06-17T09:42:22Z arbv quit (Remote host closed the connection) 2016-06-17T09:45:02Z Orion3k joined #lisp 2016-06-17T09:48:13Z qubitnerd joined #lisp 2016-06-17T09:50:06Z IPmonger joined #lisp 2016-06-17T09:54:09Z attila_lendvai quit (Ping timeout: 260 seconds) 2016-06-17T09:54:11Z IPmonger quit (Ping timeout: 240 seconds) 2016-06-17T09:57:59Z emaczen joined #lisp 2016-06-17T10:00:06Z papachan joined #lisp 2016-06-17T10:01:51Z Karl_Dscc joined #lisp 2016-06-17T10:02:31Z emaczen quit (Ping timeout: 240 seconds) 2016-06-17T10:02:37Z peey joined #lisp 2016-06-17T10:05:27Z scymtym_ quit (Ping timeout: 246 seconds) 2016-06-17T10:06:09Z ski quit (Quit: Lost terminal) 2016-06-17T10:14:08Z allezbluez quit (Ping timeout: 244 seconds) 2016-06-17T10:20:18Z attila_lendvai joined #lisp 2016-06-17T10:20:18Z attila_lendvai quit (Changing host) 2016-06-17T10:20:18Z attila_lendvai joined #lisp 2016-06-17T10:21:08Z zacharias joined #lisp 2016-06-17T10:27:48Z w37 joined #lisp 2016-06-17T10:32:11Z schaueho joined #lisp 2016-06-17T10:35:29Z knobo: PuercoPop: do you use woo? 2016-06-17T10:36:36Z therik: how do I define a macro that expands after all other macros macroexpanded, but before the compilation starts? 2016-06-17T10:38:22Z knobo: therik: what do you want to do? 2016-06-17T10:38:31Z paule32 joined #lisp 2016-06-17T10:39:38Z therik: my use case is, have some defmessage macro that will define function and populate dynamic variable with name of that function. Then when all macroexpanding is finished, a dispatcher function will be generated. This dispatcher function will take string argument and have huge (cond) form and call function of that name 2016-06-17T10:41:46Z therik: so (defmessage foo ()...) (defmessage bar () ) ... and when all those are expanded, I want (defun dispatcher (str) (cond ((equalp str "foo") (foo)) ((equalp str "bar) (bar)) .... 2016-06-17T10:42:21Z therik: I know I can use some *case form instead of cond, but essentially some form of switch() {} will be there 2016-06-17T10:42:23Z m_zr0_ joined #lisp 2016-06-17T10:43:24Z therik: now I can do it dynamically and search through *all-defined-messages* on each call to the dispatcher, but I suspect compiler can do much better if I know the names beforehand. 2016-06-17T10:44:52Z knobo: therik: so, you want to put all function names defined by defmessage in a global variable? 2016-06-17T10:45:33Z m_zr0 quit (Ping timeout: 240 seconds) 2016-06-17T10:45:37Z therik: yes, and then (defun dispatcher.. should be generated by a macro, so all that defmessage function names are essentially hard coded in there 2016-06-17T10:46:20Z therik: obviously, the defdispatcher has to be expanded after all defmessages have been expanded 2016-06-17T10:46:47Z knobo: Why do you need it to be hardcoded in a cond or case? 2016-06-17T10:47:14Z knobo: because of speed? 2016-06-17T10:47:22Z therik: well, efficiency... It's my assumption, but I think compiler can do much better with it 2016-06-17T10:47:47Z therik: if it's not hardcoded, I have to search through an array or list on each call 2016-06-17T10:48:00Z knobo: Are you doing premature optimization? 2016-06-17T10:48:04Z therik: yes :) 2016-06-17T10:48:22Z knobo: Fine by me. Do what you whant. :P 2016-06-17T10:48:32Z therik: not very premature, I know that I'm gonna be tight on CPU 2016-06-17T10:49:23Z knobo: But I think that playing with the order of evaluation of macros is not a very good idea. 2016-06-17T10:49:45Z therik: i have working version of this in node and I need to speed it up about 20x at least 2016-06-17T10:50:01Z therik: so not very premature.. 2016-06-17T10:50:13Z knobo: Rather, you can cache the result by a function during runtime 2016-06-17T10:50:17Z test1600 quit (Quit: Leaving) 2016-06-17T10:50:47Z therik: i'm not sure I understand 2016-06-17T10:51:35Z knobo: Insted of hardcoding the lookup with a macro, you make a function that generates a lookuptable 2016-06-17T10:51:42Z paule32: hello 2016-06-17T10:51:47Z therik: hey paule32 2016-06-17T10:51:51Z knobo: Then defmessage can delete that cache. 2016-06-17T10:51:59Z knobo: or update it. 2016-06-17T10:52:48Z knobo: therik: show me the function you need to speed up 20x. 2016-06-17T10:52:55Z paule32: is it possible convert a symbol to string? e.g.: ("hello" "therik") to (HELLO YOU) 2016-06-17T10:52:58Z therik: ah, you mean like recompile the dispatch after each defmessage ? 2016-06-17T10:53:51Z therik: paule32, yes, I just can't remember which one 2016-06-17T10:53:56Z knobo: paule32: yes symbol-name 2016-06-17T10:53:58Z jokleinn joined #lisp 2016-06-17T10:53:58Z jokleinn quit (Changing host) 2016-06-17T10:53:58Z jokleinn joined #lisp 2016-06-17T10:54:12Z therik: paule32, symbol-name 2016-06-17T10:54:20Z therik: ah, too late ;) 2016-06-17T10:54:23Z _death: paule32: your example does not match the question 2016-06-17T10:54:25Z paule32: heh 2016-06-17T10:54:37Z knobo: intern, then. 2016-06-17T10:55:04Z peey: Does asdf work with .asd files that have a hyphen in the name? 2016-06-17T10:55:14Z _death: yes 2016-06-17T10:55:41Z knobo: clhs intern 2016-06-17T10:55:41Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_intern.htm 2016-06-17T10:55:44Z paule32: my learnings: i have a list of symbols (defvar HEL (string "Hello")) 2016-06-17T10:56:02Z peey: _death: Was that a yes to my asdf question? 2016-06-17T10:56:03Z aries_liuxueyang quit (Ping timeout: 240 seconds) 2016-06-17T10:56:31Z elimik31 joined #lisp 2016-06-17T10:56:40Z |2dman|: therik: isn't a big (cond ...) basically the same as processing a list anyway? At runtime, you have to work through each of your conditionals to determine which branch to take. 2016-06-17T10:56:54Z paule32: then, i make a list of sentences with several symbols like (list HEL YOU) 2016-06-17T10:57:30Z aries_liuxueyang joined #lisp 2016-06-17T10:57:35Z paule32: the "random" peek of the list will printout to screen 2016-06-17T10:57:51Z therik: knobo: I've got a 2d map of thousands of objects that move pretty fast, and I'm making message system that would talk to node-js and pass the positions back and forth between the two 2016-06-17T10:58:22Z paule32: then i would like, to check, if the symbol list the same as read-line 2016-06-17T10:58:23Z therik: node will then send this to client and client can sip coffee and play :) 2016-06-17T11:00:45Z knobo: therik: if you use strings you need som kind of index lookup to make it fast. 2016-06-17T11:00:53Z knobo: cond will not help yoou. 2016-06-17T11:01:36Z frgo joined #lisp 2016-06-17T11:01:46Z therik: knobo, hmm speaking of intern, why don't I just use intern? 2016-06-17T11:02:02Z paule32: as example: when the computer say: "you are welcome" then i would like assoc. the question with a list/variable that contains "yes" 2016-06-17T11:02:07Z paule32: is that possible? 2016-06-17T11:02:23Z moore33: therik: Why not use a hash table? intern is the same thing, more or less. 2016-06-17T11:02:31Z knobo: therik: security? 2016-06-17T11:02:36Z knobo: therik: speed 2016-06-17T11:03:08Z knobo: therik: https://github.com/fukamachi/proc-parse 2016-06-17T11:03:14Z knobo: I think. 2016-06-17T11:03:24Z paule32: https://paste.fedoraproject.org/380448/66161374/ 2016-06-17T11:03:39Z paule32: this is what i done, till now 2016-06-17T11:04:14Z bigfondue joined #lisp 2016-06-17T11:09:06Z therik: hmm, so if defmessage's populate *messages*, then I'll have *messages* available at compile time, but that means that if I load the compiled result in fresh image, it won't be there again... 2016-06-17T11:09:35Z therik: I'll just recompile the dispatcher inside each defmessage, I think that's the easiest 2016-06-17T11:09:39Z allezbluez joined #lisp 2016-06-17T11:10:46Z therik: 0: thy shall write code in english 2016-06-17T11:11:05Z moore33: therik: The solution to your *messages* problem is to add to *messages* inside the expansion of the macro -- not the code of the macro -- and to wrap it in (eval-when (:compile-toplevel :load-toplevel :eval)) 2016-06-17T11:11:18Z moore33: therik: Again I mention hash tables :) 2016-06-17T11:11:27Z elimik31 quit (Remote host closed the connection) 2016-06-17T11:11:43Z elimik31 joined #lisp 2016-06-17T11:12:40Z therik: moore33, I'll try both cond and hashtable and see what's faster... 2016-06-17T11:12:51Z moore33: have fun 2016-06-17T11:12:56Z therik: moore33: but you're absolutely right, eval-when is what I need 2016-06-17T11:13:07Z therik: thanks :) 2016-06-17T11:13:11Z moore33: no prob 2016-06-17T11:13:28Z tractatus joined #lisp 2016-06-17T11:13:43Z therik: there's gonna be only about 10-20 entries in that hashtable, so that's why I'm bit hesitant to use it 2016-06-17T11:14:03Z moore33: therik: ok 2016-06-17T11:15:58Z therik: paule32: can you describe bit better and say what functions are you struggling with? 2016-06-17T11:18:39Z moore33: therik: You could also do better than a big cond by implementing a binary search for the matching message. Or you could encode that in your cond clause, for extra hacker points :) 2016-06-17T11:19:05Z tractatus quit (Quit: WeeChat 1.5) 2016-06-17T11:19:41Z scymtym joined #lisp 2016-06-17T11:20:01Z therik: moore33, heureka, I can sort that *messages* !!! 2016-06-17T11:20:10Z moore33: exactly 2016-06-17T11:20:15Z therik: i'm claiming my hacker points! 2016-06-17T11:20:32Z therik: this is perfect.. 2016-06-17T11:26:23Z paule32: therik: i have a dictonary of words, each word becomes a short symbol, so you can construct a large list of symbols which point to a sentence 2016-06-17T11:26:30Z moore33: I'm surprised there isn't already a function to do a binary search on a sorted sequence or array, like in C++. 2016-06-17T11:27:47Z paule32: therik: and the new list i would like assoc. with an other list, which contain the weight of the sentence 2016-06-17T11:28:43Z paule32: the computer collect the last one and make decision, which he ask next 2016-06-17T11:29:14Z paule32: simple words: a monkey bot :-) 2016-06-17T11:29:15Z qubitnerd quit (Read error: Connection reset by peer) 2016-06-17T11:30:38Z nowolfer quit (Ping timeout: 244 seconds) 2016-06-17T11:31:25Z therik: paule32, so you have large list of symbols from monkey strings and each symbol points to a sentence? 2016-06-17T11:31:38Z therik: and sentence is another list? 2016-06-17T11:32:19Z elimik31 quit (Remote host closed the connection) 2016-06-17T11:32:24Z therik: I still don't get it 2016-06-17T11:32:34Z paule32: each symbol points to a word and that symbol, i create a list "sentence" 2016-06-17T11:33:07Z paule32: e.g.: (defvar WOD (string "wood")) 2016-06-17T11:33:16Z elimik31 joined #lisp 2016-06-17T11:33:59Z mvilleneuve quit (Quit: This computer has gone to sleep) 2016-06-17T11:34:03Z paule32: the list "sentence" contains lists of sentence (WOD GRN) 2016-06-17T11:34:17Z paule32: this stands for "wood" "green" 2016-06-17T11:34:27Z elimik31 quit (Remote host closed the connection) 2016-06-17T11:34:46Z paule32: then, i like to ask: "ist the wood green" ? 2016-06-17T11:35:42Z therik: ok, so each symbol is a variable, you make '(woo grn) list and you say you have list containing weights? 2016-06-17T11:35:44Z paule32: the two strings: "wood" + "green" i would to a list: "the wood is green" 2016-06-17T11:35:57Z paule32: yes 2016-06-17T11:36:32Z therik: how does the weight list look? 2016-06-17T11:37:20Z paule32: it can be an other list with ("the wood is green") as fact 2016-06-17T11:37:22Z therik: wait, the list of sentences contains sentence, so like '((wod grn) (hous blau) (man red)).. ? 2016-06-17T11:37:33Z paule32: right 2016-06-17T11:38:00Z therik: and you want to process (wod grn) into "the wood is green? 2016-06-17T11:38:08Z paule32: right 2016-06-17T11:38:17Z paule32: as fact or list of facts 2016-06-17T11:38:35Z elimik31 joined #lisp 2016-06-17T11:38:42Z paule32: so i can decied one, or NIL, if not 2016-06-17T11:39:34Z therik: (format t "The ~a is ~a." (car fact) (cadr fact)) 2016-06-17T11:40:26Z paule32: ok, thank you 2016-06-17T11:40:47Z therik: will get (wod grn) into "The wood is green." if you create (wod grn) as (list wod grn) 2016-06-17T11:41:43Z papachan quit (Quit: Leaving) 2016-06-17T11:42:03Z paule32: thank you, i am in background 2016-06-17T11:43:16Z DGASAU quit (Read error: Connection reset by peer) 2016-06-17T11:43:43Z DGASAU joined #lisp 2016-06-17T11:43:48Z peey quit (Ping timeout: 250 seconds) 2016-06-17T11:44:48Z therik: if you're getting "The wod is grn." then you need to extract the value from it.. 2016-06-17T11:45:02Z mvilleneuve joined #lisp 2016-06-17T11:45:07Z therik: also, those lists are almost as bad as it gets to make large scale searches on them 2016-06-17T11:55:05Z alesguzik joined #lisp 2016-06-17T11:55:47Z alesguzik quit (Client Quit) 2016-06-17T11:56:51Z clop joined #lisp 2016-06-17T11:57:43Z elimik31 quit (Remote host closed the connection) 2016-06-17T11:58:00Z elimik31 joined #lisp 2016-06-17T11:58:12Z mbrock joined #lisp 2016-06-17T11:59:16Z emaczen joined #lisp 2016-06-17T12:00:25Z elimik31 quit (Remote host closed the connection) 2016-06-17T12:01:12Z elimik31 joined #lisp 2016-06-17T12:01:29Z araujo_ joined #lisp 2016-06-17T12:01:42Z IPmonger joined #lisp 2016-06-17T12:02:33Z elimik31 quit (Remote host closed the connection) 2016-06-17T12:02:46Z araujo_ quit (Max SendQ exceeded) 2016-06-17T12:03:48Z araujo_ joined #lisp 2016-06-17T12:04:35Z araujo quit (Ping timeout: 258 seconds) 2016-06-17T12:04:39Z shdeng quit (Quit: Leaving) 2016-06-17T12:05:09Z pierpa joined #lisp 2016-06-17T12:05:21Z emaczen quit (Ping timeout: 276 seconds) 2016-06-17T12:06:09Z edgar-rft quit (Quit: edgar-rft) 2016-06-17T12:06:28Z IPmonger quit (Ping timeout: 264 seconds) 2016-06-17T12:07:35Z araujo__ joined #lisp 2016-06-17T12:08:10Z therik: moore33: So I can generate a tree of nested if's where n-th level of ifs compares n-th character in the string, that would sort it... my assumption was that there's something in the compiler that would already do this.. 2016-06-17T12:08:47Z moore33: Highly doubtful. 2016-06-17T12:09:12Z reepca: I imagine most compiler designers would expect common lisp programmers to be using large cond/case chains with symbols, not strings 2016-06-17T12:09:14Z araujo__ quit (Max SendQ exceeded) 2016-06-17T12:09:17Z constantinexvi quit (Quit: Exiting) 2016-06-17T12:09:43Z therik: well I can easily use symbols 2016-06-17T12:09:46Z moore33: However, If it was me I would use string< at each level of the tree i.e., do the comparison based on strings, not characters. 2016-06-17T12:10:06Z araujo__ joined #lisp 2016-06-17T12:10:31Z araujo_ quit (Ping timeout: 252 seconds) 2016-06-17T12:11:15Z therik: i'll post it when i'm done :) All hail premature optimization :) 2016-06-17T12:11:22Z moore33: indeed. 2016-06-17T12:11:35Z araujo__ quit (Max SendQ exceeded) 2016-06-17T12:11:43Z moore33: And then compare it to a runtime binary search in a sorted array. 2016-06-17T12:12:26Z araujo__ joined #lisp 2016-06-17T12:12:30Z therik: moore33, what would you bet on 2016-06-17T12:12:31Z reepca: and then generalize it to a "selectf" macro of course 2016-06-17T12:13:26Z therik: what's selectf macro? 2016-06-17T12:13:29Z moore33: therik: I think the differences will be hard to measure. 2016-06-17T12:13:37Z araujo_ joined #lisp 2016-06-17T12:13:38Z reepca: an imaginary future macro 2016-06-17T12:14:09Z therik: ah you mean like setf with unlimited depth of whatever? 2016-06-17T12:14:12Z moore33: For truly cache-friendly behavior, you don't want the array of strings sorted in order, but in something like a heap. 2016-06-17T12:15:02Z troydm quit (Ping timeout: 244 seconds) 2016-06-17T12:16:44Z therik: moore33, I think better measurement would be against case, hashtable and list iteration 2016-06-17T12:17:42Z araujo__ quit (Ping timeout: 276 seconds) 2016-06-17T12:17:43Z therik: I didn't know heap is cache friendly.. so I'm gonna implement macro that generates heap out of my source... 2016-06-17T12:18:11Z therik: ... lisp.. just wow... 2016-06-17T12:18:20Z moore33: therik: There was recently some posts about that, maybe on Hacker News... can't remember. 2016-06-17T12:19:34Z moore33: But the motivator is doing the first several probes in memory that is likely to be in the cache. 2016-06-17T12:20:03Z moore33: Whereas the classic binary search jumps all over the place. 2016-06-17T12:21:30Z therik: wait, but how do I search in a heap? If I check root's children and both are smaller than my string, which way to go? 2016-06-17T12:21:52Z moore33: http://bannalia.blogspot.fr/2015/06/cache-friendly-binary-search.html 2016-06-17T12:22:30Z peey joined #lisp 2016-06-17T12:22:42Z moore33: I don't actually mean a "heap." Sorry! 2016-06-17T12:22:57Z porky11 joined #lisp 2016-06-17T12:23:13Z moore33: I meant the tree-in-array structure where the nodes are stored in breadth-first order. 2016-06-17T12:23:37Z clop quit (Quit: This computer has gone to sleep) 2016-06-17T12:23:44Z therik: ah I see what you mean 2016-06-17T12:25:15Z pierpa: anybody knows if in clozure CL there's a way to control how character literals are displayed? 2016-06-17T12:25:23Z HeyFlash quit (Ping timeout: 250 seconds) 2016-06-17T12:25:49Z eudoxia joined #lisp 2016-06-17T12:26:08Z therik: ya, it's still binary search, just flattened... also good idea :) so I can make two arrays, one with function names in order and perform this flat tree search on it, then the index I end up on will be same like the index of the corresponding function in second array... 2016-06-17T12:26:14Z mbuf quit (Quit: rcirc on GNU Emacs 24.5.2) 2016-06-17T12:26:50Z therik: cause if I put ("name" . #'function), the searching will still jump all over the place to get to those conses 2016-06-17T12:26:51Z peey: When I do (asdf:load-system 'my-system) I get the error The name "MY-SYSTEM" does not designate any package. [Condition of type SB-KERNEL:SIMPLE-PACKAGE-ERROR]. But (asdf:find-system 'my-system) returns a system object. Anyone know what I am doing wrong? 2016-06-17T12:26:52Z pierpa: btw, there's a paper by Clinger about optimal compilation of cases 2016-06-17T12:28:21Z moore33: therik: It's true that Lisp is at a bit of a disadvantage here. OTOH, you could store the functions in-line in your table i.e., have each name/function pair take two entries. 2016-06-17T12:28:30Z moore33: This is all insane of course. 2016-06-17T12:29:33Z Portable_Cheese joined #lisp 2016-06-17T12:29:52Z therik: Certainly. 2016-06-17T12:31:13Z Xach: peey: systems are not packages. 2016-06-17T12:31:27Z Xach: peey: systems can load code that defines packages, but find-system and find-package work in two different namespaces. 2016-06-17T12:31:30Z EvW joined #lisp 2016-06-17T12:32:05Z Xach: peey: if you get that error immediately from load-system, that means your package definitions do not precede references to them in your source code. 2016-06-17T12:32:27Z Xach: peey: easier to troubleshoot if you paste.lisp.org your .asd file 2016-06-17T12:32:38Z shka quit (Ping timeout: 244 seconds) 2016-06-17T12:33:49Z therik: moore33, depending on the size of cache and size of array, it might be faster or slower... that last hop to the function will be faster if it's inlined, but only half as many entries will fit in cache.. Still good for my use case of ~10 functions though.. 2016-06-17T12:34:24Z clop joined #lisp 2016-06-17T12:34:42Z kushal quit (Quit: Leaving) 2016-06-17T12:35:01Z therik: what I was really looking for was that eval-when though... this will be nice exercise, but if I really needed that much speed, I wouldn't be parsing json few lines above.. 2016-06-17T12:35:43Z kushal joined #lisp 2016-06-17T12:36:55Z moore33: therik: I actually got the syntax slightly wrong. It's (eval-when (:compile-toplevel :load-toplevel :execute) ...) I always get confused between the old and new versions of the operator. 2016-06-17T12:37:33Z peey: Fixed now. Name of my system and package is the same which caused the confusion. One of my files were using (in-package) and package was defined in a later file. Thanks Xach! 2016-06-17T12:38:59Z therik: now I'm thinking, I need to convert those strings to numbers cause strings will be stored in an array as pointers if I'm right... Luckily, I can get through this with hash function.. 2016-06-17T12:40:04Z smokeink quit (Ping timeout: 264 seconds) 2016-06-17T12:40:21Z smokeink joined #lisp 2016-06-17T12:40:57Z troydm joined #lisp 2016-06-17T12:42:02Z sausages joined #lisp 2016-06-17T12:42:20Z jdz: was https://pvk.ca/Blog/Lisp/string_case_bis.html already mentioned? 2016-06-17T12:42:23Z kdas__ joined #lisp 2016-06-17T12:44:56Z kushal quit (Disconnected by services) 2016-06-17T12:45:54Z kdas__ is now known as kushal 2016-06-17T12:46:06Z kushal quit (Changing host) 2016-06-17T12:46:06Z kushal joined #lisp 2016-06-17T12:46:32Z therik: hm, this would be really cool for lexers, where you usually know the keywords from the syntax ahead of time... 2016-06-17T12:47:51Z peterh quit (Ping timeout: 246 seconds) 2016-06-17T12:48:20Z aries_liuxueyang quit (Quit: No Ping reply in 180 seconds.) 2016-06-17T12:50:20Z aries_liuxueyang joined #lisp 2016-06-17T12:50:35Z sausages quit (Quit: Reconnecting) 2016-06-17T12:50:43Z sausages joined #lisp 2016-06-17T12:51:11Z EvW quit (Ping timeout: 250 seconds) 2016-06-17T12:51:21Z sausages quit (Client Quit) 2016-06-17T12:51:42Z _death: if the set of strings is known ahead of time you can create a perfect hash function 2016-06-17T12:52:32Z therik: _death, is that something that can be automated? 2016-06-17T12:52:52Z _death: yes.. I see that pkhoung wrote "A string-case based on perfect hashing would also be an option. However, finding such a hash function can take some time, and pessimises behaviour on mismatches." 2016-06-17T12:53:25Z therik: "take some time" as in processor time or in pen and paper time? 2016-06-17T12:53:52Z sausages joined #lisp 2016-06-17T12:53:56Z _death: it can take time to derive the hash function itself 2016-06-17T12:54:09Z _death: if you're interested you can check https://www.gnu.org/software/gperf/ 2016-06-17T12:54:29Z holycow joined #lisp 2016-06-17T12:54:44Z clop quit (Quit: This computer has gone to sleep) 2016-06-17T12:55:06Z therik: ok, good 2016-06-17T13:02:33Z DavidGuru quit (Remote host closed the connection) 2016-06-17T13:03:38Z Bourne quit (Quit: leaving) 2016-06-17T13:04:12Z w37 quit (Remote host closed the connection) 2016-06-17T13:04:38Z peterh joined #lisp 2016-06-17T13:06:39Z EvW joined #lisp 2016-06-17T13:06:56Z FreeBirdLjj quit (Remote host closed the connection) 2016-06-17T13:09:38Z zacharias quit (Ping timeout: 272 seconds) 2016-06-17T13:11:32Z porky11 quit (Ping timeout: 260 seconds) 2016-06-17T13:11:59Z mac_ified joined #lisp 2016-06-17T13:12:12Z peey quit (Ping timeout: 250 seconds) 2016-06-17T13:13:01Z clop joined #lisp 2016-06-17T13:15:10Z araujo__ joined #lisp 2016-06-17T13:16:12Z araujo_ quit (Ping timeout: 260 seconds) 2016-06-17T13:18:03Z LiamH joined #lisp 2016-06-17T13:19:25Z holycow: does anyone know the name of that wiki written by a profession at an eu university? I cannot find it anywhere and it doesn't seem to be on cliki 2016-06-17T13:19:27Z harish_ quit (Ping timeout: 276 seconds) 2016-06-17T13:19:59Z IPmonger joined #lisp 2016-06-17T13:20:30Z ramky quit (Ping timeout: 244 seconds) 2016-06-17T13:23:01Z eudoxia: lambdawiki or something i think 2016-06-17T13:24:07Z holycow: ooo, it's something like that. okay getting closer. thx! 2016-06-17T13:24:50Z IPmonger quit (Ping timeout: 260 seconds) 2016-06-17T13:25:42Z CEnnis91 joined #lisp 2016-06-17T13:26:52Z warweasle joined #lisp 2016-06-17T13:27:22Z holycow: epsilonwiki 2016-06-17T13:27:28Z holycow: thank you for the push in the right direction 2016-06-17T13:28:30Z wccoder joined #lisp 2016-06-17T13:31:15Z ramky joined #lisp 2016-06-17T13:31:58Z edgar-rft joined #lisp 2016-06-17T13:33:45Z wccoder quit (Ping timeout: 276 seconds) 2016-06-17T13:34:31Z vaitel joined #lisp 2016-06-17T13:39:32Z porky11 joined #lisp 2016-06-17T13:41:14Z ramky quit (Quit: Leaving) 2016-06-17T13:49:27Z nzambe joined #lisp 2016-06-17T13:51:59Z puchacz joined #lisp 2016-06-17T13:52:29Z allezbluez quit (Read error: Connection reset by peer) 2016-06-17T13:52:47Z allezbluez joined #lisp 2016-06-17T13:52:47Z allezbluez quit (Changing host) 2016-06-17T13:52:47Z allezbluez joined #lisp 2016-06-17T13:58:44Z adolf_stalin joined #lisp 2016-06-17T13:59:14Z harish_ joined #lisp 2016-06-17T13:59:17Z vlatkoB_ joined #lisp 2016-06-17T14:01:04Z emaczen joined #lisp 2016-06-17T14:01:31Z steee quit (Read error: Connection reset by peer) 2016-06-17T14:02:25Z clop quit (Quit: This computer has gone to sleep) 2016-06-17T14:02:44Z steee joined #lisp 2016-06-17T14:03:06Z vlatkoB quit (Ping timeout: 246 seconds) 2016-06-17T14:06:06Z ghsk joined #lisp 2016-06-17T14:08:38Z kobain joined #lisp 2016-06-17T14:22:48Z adolf_stalin quit (Quit: Leaving...) 2016-06-17T14:24:14Z puchacz quit (Quit: Konversation terminated!) 2016-06-17T14:26:05Z kushal quit (Ping timeout: 250 seconds) 2016-06-17T14:30:11Z lexicall joined #lisp 2016-06-17T14:36:07Z emaczen quit (Ping timeout: 244 seconds) 2016-06-17T14:36:24Z Petit_Dejeuner quit (Ping timeout: 272 seconds) 2016-06-17T14:36:48Z allezbluez quit (Ping timeout: 276 seconds) 2016-06-17T14:37:29Z optikalmouse joined #lisp 2016-06-17T14:38:45Z peterh quit (Ping timeout: 276 seconds) 2016-06-17T14:41:17Z nowolfer joined #lisp 2016-06-17T14:50:27Z kolko quit (Ping timeout: 276 seconds) 2016-06-17T14:55:42Z danieli quit (Changing host) 2016-06-17T14:55:42Z danieli joined #lisp 2016-06-17T14:56:30Z PuercoPop: knobo: not really, I use hunchentoot and wookie. Why? 2016-06-17T15:06:07Z mbrock quit (Quit: Connection closed for inactivity) 2016-06-17T15:08:50Z sausages quit (Quit: leaving) 2016-06-17T15:10:27Z zygentoma joined #lisp 2016-06-17T15:10:50Z cmos joined #lisp 2016-06-17T15:11:35Z optikalmouse quit (Ping timeout: 244 seconds) 2016-06-17T15:12:00Z optikalmouse joined #lisp 2016-06-17T15:14:02Z flamebeard quit (Quit: Leaving) 2016-06-17T15:17:33Z harish_ quit (Ping timeout: 240 seconds) 2016-06-17T15:19:39Z harish_ joined #lisp 2016-06-17T15:20:46Z unrahul joined #lisp 2016-06-17T15:25:06Z davijob joined #lisp 2016-06-17T15:26:19Z davijob left #lisp 2016-06-17T15:26:33Z IPmonger joined #lisp 2016-06-17T15:27:41Z grublet2 joined #lisp 2016-06-17T15:28:09Z grublet2 quit (Remote host closed the connection) 2016-06-17T15:28:51Z grublet quit (Ping timeout: 240 seconds) 2016-06-17T15:30:51Z IPmonger quit (Ping timeout: 250 seconds) 2016-06-17T15:32:22Z sqglz quit (Ping timeout: 252 seconds) 2016-06-17T15:32:46Z adolf_stalin joined #lisp 2016-06-17T15:32:49Z EvW quit (Ping timeout: 250 seconds) 2016-06-17T15:38:20Z happy-dude joined #lisp 2016-06-17T15:38:27Z lexicall quit (Ping timeout: 250 seconds) 2016-06-17T15:38:31Z smokeink quit (Ping timeout: 240 seconds) 2016-06-17T15:41:47Z tsikov joined #lisp 2016-06-17T15:42:02Z DavidGuru joined #lisp 2016-06-17T15:43:35Z mastokley joined #lisp 2016-06-17T15:46:41Z davijob joined #lisp 2016-06-17T15:47:12Z davijob left #lisp 2016-06-17T15:47:21Z davijob joined #lisp 2016-06-17T15:47:30Z davijob left #lisp 2016-06-17T15:48:03Z davijob joined #lisp 2016-06-17T15:48:04Z wccoder joined #lisp 2016-06-17T15:48:20Z davijob quit (Client Quit) 2016-06-17T15:51:45Z al-damiri joined #lisp 2016-06-17T15:53:10Z fkac joined #lisp 2016-06-17T16:01:59Z Karl_Dscc quit (Remote host closed the connection) 2016-06-17T16:02:15Z Ulster joined #lisp 2016-06-17T16:02:33Z mbuf joined #lisp 2016-06-17T16:06:57Z therik: (anaphora:aif t it nil) 2016-06-17T16:07:04Z therik: The variable IT is unbound. 2016-06-17T16:07:14Z therik: dafuq? 2016-06-17T16:09:27Z scymtym_ joined #lisp 2016-06-17T16:11:05Z scymtym quit (Ping timeout: 260 seconds) 2016-06-17T16:12:07Z PuercoPop: therik: you have to import the it symbol from anaphora 2016-06-17T16:12:32Z PuercoPop: (I would recommend to use alexandria's let-if instead) 2016-06-17T16:13:05Z therik: ok 2016-06-17T16:13:10Z edgar-rft: or write (anaphora:aif t anaphora:it nil) 2016-06-17T16:13:52Z therik: ah I see 2016-06-17T16:19:15Z _paul0 quit (Quit: Leaving) 2016-06-17T16:19:32Z paul0 joined #lisp 2016-06-17T16:19:44Z knicklux joined #lisp 2016-06-17T16:20:08Z AdmiralBumbleBee left #lisp 2016-06-17T16:27:35Z Karl_Dscc joined #lisp 2016-06-17T16:28:36Z paule32: hello 2016-06-17T16:28:59Z paule32: is it possible to implement OpenCV - Computer Vison 2016-06-17T16:32:23Z emaczen joined #lisp 2016-06-17T16:35:10Z optikalmouse quit (Quit: optikalmouse) 2016-06-17T16:37:03Z holly2 quit (Ping timeout: 240 seconds) 2016-06-17T16:38:00Z emaczen quit (Ping timeout: 272 seconds) 2016-06-17T16:38:30Z holly2 joined #lisp 2016-06-17T16:38:57Z mvilleneuve quit (Quit: This computer has gone to sleep) 2016-06-17T16:39:34Z harish_ quit (Quit: Leaving) 2016-06-17T16:39:46Z harish joined #lisp 2016-06-17T16:40:04Z karswell quit (Remote host closed the connection) 2016-06-17T16:40:53Z karswell joined #lisp 2016-06-17T16:40:57Z kolko joined #lisp 2016-06-17T16:41:38Z hhdave quit (Ping timeout: 244 seconds) 2016-06-17T16:43:07Z cmos quit (Quit: Computer has gone to sleep.) 2016-06-17T16:46:58Z Grue`: (anaphora:aif foo anaphora:it nil) is just equivalent to foo isn't it? And (anaphora:aif foo anaphora:it bar) is equivalent to (or foo bar) 2016-06-17T16:47:26Z araujo__ quit (Quit: Leaving) 2016-06-17T16:47:32Z therik: Grue`, yes 2016-06-17T16:48:17Z moore33 quit (Quit: Leaving) 2016-06-17T16:48:48Z therik: paule32, in cl? 2016-06-17T16:48:56Z paule32: yes 2016-06-17T16:49:17Z therik: anything can be implemented in cl 2016-06-17T16:49:33Z therik: it's turing complete.. but it likely won't be as fast as optimized C 2016-06-17T16:50:27Z therik: by fast, I mean performance, it will probably be way faster in development time though 2016-06-17T16:52:09Z therik: hmm, so I have my branching optimized switch almost ready.. and it's awesomely safe... if the provided message doesn't correspond to any function, it will just call some function with a roughly similar name :D 2016-06-17T16:53:26Z gravicappa joined #lisp 2016-06-17T16:57:02Z Harag quit (Remote host closed the connection) 2016-06-17T16:57:13Z Harag joined #lisp 2016-06-17T16:57:48Z akkad: what is (declare (ignore foo bar baz ...? 2016-06-17T16:58:01Z akkad: is that a gc hint to throw those away? 2016-06-17T16:59:06Z jasom: akkad: it promises that you won't ever use them. "ignorable" means you might not use them 2016-06-17T16:59:20Z jasom: the latter is mainly to suppress unused variable warnings 2016-06-17T16:59:45Z isoraqathedh: The former sometimes marks not-yet-implemented things. 2016-06-17T17:02:54Z d4ryus is now known as Guest7312 2016-06-17T17:02:54Z d4ryus_ joined #lisp 2016-06-17T17:02:54Z Guest7312 quit (Killed (tepper.freenode.net (Nickname regained by services))) 2016-06-17T17:02:54Z d4ryus_ is now known as d4ryus 2016-06-17T17:05:12Z jasom: it's also used sometimes when destructuring and you only want some values 2016-06-17T17:06:07Z Karl_Dscc quit (Remote host closed the connection) 2016-06-17T17:06:18Z nowolfer quit (Ping timeout: 276 seconds) 2016-06-17T17:13:13Z cmos joined #lisp 2016-06-17T17:13:15Z akkad: if you have a filename in a var how do you express #Pvar? 2016-06-17T17:13:59Z akkad: ahh make-pathname 2016-06-17T17:17:57Z pjb joined #lisp 2016-06-17T17:21:20Z IPmonger joined #lisp 2016-06-17T17:22:11Z Penta joined #lisp 2016-06-17T17:23:56Z akkad: how evil is this? https://gist.github.com/9abf01bb831ea134186abc129a06d6bd looking to clean it up 2016-06-17T17:25:55Z IPmonger quit (Ping timeout: 250 seconds) 2016-06-17T17:26:20Z Pent quit (Ping timeout: 260 seconds) 2016-06-17T17:27:12Z papachan joined #lisp 2016-06-17T17:31:53Z DeadTrickster joined #lisp 2016-06-17T17:32:16Z mastokley quit (Ping timeout: 264 seconds) 2016-06-17T17:37:02Z therik: https://gist.github.com/therik/f41674de78e7acfaa704322352e2b8cd 2016-06-17T17:42:01Z DavidGuru quit (Quit: DavidGuru) 2016-06-17T17:42:15Z allezbluez joined #lisp 2016-06-17T17:42:15Z allezbluez quit (Changing host) 2016-06-17T17:42:15Z allezbluez joined #lisp 2016-06-17T17:47:17Z nalik891 joined #lisp 2016-06-17T17:49:53Z nalik891 left #lisp 2016-06-17T17:52:12Z Grue`: akkad: I can confirm that get-stat crashes on sbcl on windows 2016-06-17T17:53:12Z Grue`: that said, sb-posix doesn't work very well on windows... 2016-06-17T17:56:06Z nalik89 joined #lisp 2016-06-17T17:56:07Z Grue`: also you can just use sb-posix:stat without opening the file first 2016-06-17T17:56:08Z nalik89 quit (Excess Flood) 2016-06-17T17:56:33Z |2dman|: hello, is anyone here familiar with the lquery library? 2016-06-17T17:56:49Z nalik891 joined #lisp 2016-06-17T17:56:51Z nalik891 quit (Excess Flood) 2016-06-17T17:57:39Z nalik891 joined #lisp 2016-06-17T17:57:41Z nalik891 quit (Excess Flood) 2016-06-17T17:58:29Z nalik891 joined #lisp 2016-06-17T17:58:32Z nalik891 quit (Excess Flood) 2016-06-17T17:59:14Z nalik891 joined #lisp 2016-06-17T17:59:16Z nalik891 quit (Excess Flood) 2016-06-17T17:59:49Z nalik891 joined #lisp 2016-06-17T17:59:50Z nalik891 quit (Excess Flood) 2016-06-17T18:00:09Z nalik891 joined #lisp 2016-06-17T18:00:11Z nalik891 quit (Excess Flood) 2016-06-17T18:00:33Z eudoxia quit (Quit: Leaving) 2016-06-17T18:00:39Z nalik891 joined #lisp 2016-06-17T18:00:40Z nalik891 quit (Excess Flood) 2016-06-17T18:01:11Z nalik891 joined #lisp 2016-06-17T18:01:13Z nalik891 quit (Excess Flood) 2016-06-17T18:01:51Z nalik891 joined #lisp 2016-06-17T18:01:54Z nalik891 quit (Excess Flood) 2016-06-17T18:02:36Z nalik891 joined #lisp 2016-06-17T18:02:36Z _death: 2dman: it's better to ask a question about the library itself and not about the people in this channel 2016-06-17T18:02:40Z nalik891 quit (Excess Flood) 2016-06-17T18:02:58Z yrk quit (Read error: Connection reset by peer) 2016-06-17T18:03:26Z nalik891 joined #lisp 2016-06-17T18:03:29Z nalik891 quit (Excess Flood) 2016-06-17T18:04:16Z nalik891 joined #lisp 2016-06-17T18:04:18Z nalik891 quit (Excess Flood) 2016-06-17T18:04:29Z keltvek quit (Ping timeout: 250 seconds) 2016-06-17T18:05:07Z nalik891 joined #lisp 2016-06-17T18:05:11Z nalik891 quit (Excess Flood) 2016-06-17T18:05:32Z papachan quit (Ping timeout: 250 seconds) 2016-06-17T18:05:58Z nalik891 joined #lisp 2016-06-17T18:06:00Z nalik891 quit (Excess Flood) 2016-06-17T18:06:47Z nalik891 joined #lisp 2016-06-17T18:06:48Z nalik891 quit (Excess Flood) 2016-06-17T18:07:37Z nalik891 joined #lisp 2016-06-17T18:07:38Z nalik891 quit (Excess Flood) 2016-06-17T18:08:00Z happy-dude quit (Quit: Connection closed for inactivity) 2016-06-17T18:08:22Z nalik891 joined #lisp 2016-06-17T18:08:23Z nalik891 quit (Excess Flood) 2016-06-17T18:08:43Z |2dman|: _death: thanks (I think?) -- I'm building a web scraper, and have working code, but it seems like the library is designed to do what I'm doing more quickly 2016-06-17T18:09:01Z tos-1 joined #lisp 2016-06-17T18:09:07Z nalik891 joined #lisp 2016-06-17T18:09:09Z nalik891 quit (Excess Flood) 2016-06-17T18:09:21Z |2dman|: I want to use lquery to find tags, filter them by their class value, and then extract the src attribute value from the last one 2016-06-17T18:09:54Z nalik891 joined #lisp 2016-06-17T18:09:55Z nalik891 quit (Excess Flood) 2016-06-17T18:09:58Z |2dman|: my current working code first extracts the tags, then processes them in a loop, collecting the ones with the right class value 2016-06-17T18:10:17Z |2dman|: but reading the docs, I feel like I should be able to do this in one shot, but the docs are confusing 2016-06-17T18:10:43Z nalik891 joined #lisp 2016-06-17T18:10:45Z nalik891 quit (Excess Flood) 2016-06-17T18:17:09Z cmos quit (Quit: ["Textual IRC Client: www.textualapp.com"]) 2016-06-17T18:18:50Z puchacz joined #lisp 2016-06-17T18:19:29Z Grue`: there's also https://github.com/AccelerationNet/css-selectors it might be more straightforward 2016-06-17T18:19:36Z thijso joined #lisp 2016-06-17T18:19:49Z PuercoPop: |2dman|: You are looking for clss https://github.com/Shinmera/CLSS 2016-06-17T18:19:49Z Grue`: although there's no css selector for last matched element 2016-06-17T18:19:51Z thijso quit (Client Quit) 2016-06-17T18:19:58Z PuercoPop: (or css-selectors) 2016-06-17T18:20:26Z PuercoPop: Grue`: cl:last will come in handy for that 2016-06-17T18:20:44Z Grue`: yeah, but it won't be "one-shot" anymore 2016-06-17T18:20:56Z Grue`: also you'd need (car (last ...)) 2016-06-17T18:21:20Z dwchandler left #lisp 2016-06-17T18:21:27Z thijso joined #lisp 2016-06-17T18:21:28Z |2dman|: Grue`: right, I encountered the results of (last ...) already 2016-06-17T18:23:27Z |2dman|: ok, apparently I have an answer now 2016-06-17T18:23:44Z |2dman|: ($ (initialize source) "img.media" (attr "src")) 2016-06-17T18:24:03Z |2dman|: I didn't realize I could append "." to filter on CSS 2016-06-17T18:24:10Z |2dman|: and then (car (reverse ...)) on that 2016-06-17T18:25:33Z Penta quit (Quit: Leaving) 2016-06-17T18:25:40Z eli quit (Ping timeout: 272 seconds) 2016-06-17T18:25:57Z Pent joined #lisp 2016-06-17T18:26:04Z krwq joined #lisp 2016-06-17T18:26:44Z sauvin quit (Read error: Connection reset by peer) 2016-06-17T18:27:13Z EvW joined #lisp 2016-06-17T18:29:02Z PuercoPop: |2dman|: (aref (length )) is better, not need to cons by reversing 2016-06-17T18:30:10Z porky11 quit (Remote host closed the connection) 2016-06-17T18:32:17Z keltvek joined #lisp 2016-06-17T18:32:34Z |2dman|: PuercoPop: quite true, though on average these pages have either 1 or 2 entries, and it's always the last one that I want 2016-06-17T18:32:52Z mbuf quit (Quit: rcirc on GNU Emacs 24.4.1) 2016-06-17T18:33:08Z emaczen joined #lisp 2016-06-17T18:35:46Z schjetne quit (Remote host closed the connection) 2016-06-17T18:38:39Z BlueRavenGT joined #lisp 2016-06-17T18:38:54Z emaczen quit (Ping timeout: 246 seconds) 2016-06-17T18:39:52Z fourier joined #lisp 2016-06-17T18:41:05Z fourier: is where any functions in CL to convert byte array to number in network-byte ordor? 2016-06-17T18:44:21Z fe[nl]ix: nibbles 2016-06-17T18:44:30Z aeth quit (Ping timeout: 260 seconds) 2016-06-17T18:46:18Z aeth joined #lisp 2016-06-17T18:48:59Z schjetne joined #lisp 2016-06-17T18:51:28Z akkad: Grue`: thanks 2016-06-17T18:53:37Z akkad: Ttpwd 2016-06-17T18:54:34Z fourier: thanks.. works for me 2016-06-17T18:57:12Z ghsk quit (Quit: leaving) 2016-06-17T19:01:41Z strykerkkd joined #lisp 2016-06-17T19:02:48Z mastokley joined #lisp 2016-06-17T19:07:48Z fourier` joined #lisp 2016-06-17T19:08:52Z fourier quit (Ping timeout: 264 seconds) 2016-06-17T19:09:42Z knicklux quit (Remote host closed the connection) 2016-06-17T19:15:44Z scymtym_ quit (Ping timeout: 250 seconds) 2016-06-17T19:19:49Z papachan joined #lisp 2016-06-17T19:20:59Z zonit quit (Quit: Leaving) 2016-06-17T19:21:28Z marsjaninzmarsa quit (Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in) 2016-06-17T19:21:32Z fourier`: is where a way to do bitwise logical operations on numbers? 2016-06-17T19:22:08Z fourier`: or on single (unsigned-byte 8)s 2016-06-17T19:22:28Z fourier`: found bit-and etc but they work only on arrays :( 2016-06-17T19:23:04Z marsjaninzmarsa joined #lisp 2016-06-17T19:25:26Z phoe_krk: fourier`: ayup 2016-06-17T19:25:39Z phoe_krk: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node131.html 2016-06-17T19:26:00Z phoe_krk: (logand 248 31) ;=> 24 2016-06-17T19:27:02Z phoe_krk: tastes better when you write numbers in hex notation 2016-06-17T19:27:22Z phoe_krk: (logand 1234567890 #xFFFF) ;=> 722 2016-06-17T19:28:11Z fourier`: phoe_krk: oh great thanks! 2016-06-17T19:28:39Z phoe_krk: fourier`: don't thank me, thank X3J13 and the original creators of these ideas and their implementations if anyone 2016-06-17T19:29:23Z phoe_krk: bonus: they work on integers of arbitrary length 2016-06-17T19:30:33Z wccoder quit (Remote host closed the connection) 2016-06-17T19:31:23Z emaczen joined #lisp 2016-06-17T19:38:03Z defaultxr joined #lisp 2016-06-17T19:41:44Z m_zr0_ quit (Quit: brb) 2016-06-17T19:42:00Z m_zr0 joined #lisp 2016-06-17T19:43:40Z wildlander joined #lisp 2016-06-17T19:44:51Z AntiSpamMeta quit (Excess Flood) 2016-06-17T19:45:14Z AntiSpamMeta joined #lisp 2016-06-17T19:45:16Z happy-dude joined #lisp 2016-06-17T19:45:27Z EvW quit (Ping timeout: 250 seconds) 2016-06-17T19:46:15Z jasom: fourier`: also look at ldb and friends, which can make certain bit manipulations much more clear 2016-06-17T19:46:18Z jasom: clhs ldb 2016-06-17T19:46:18Z specbot: http://www.lispworks.com/reference/HyperSpec/Body/f_ldb.htm 2016-06-17T19:46:30Z jasom: also note that ldb is setf able 2016-06-17T19:47:40Z fridim_ quit (Ping timeout: 244 seconds) 2016-06-17T19:48:02Z shka joined #lisp 2016-06-17T19:48:13Z jasom: (format t "~X" (let ((x #xffff)) (setf (ldb (byte 4 4) x) 0) x)) ; => FF0F 2016-06-17T19:48:41Z jasom: with a constant, perhaps anding with a mask is more clear, but if "0" were a nibble I wanted to set in from a variable... 2016-06-17T19:49:33Z jasom: (format t "~X" (let ((x #xffff)) (setf (ldb (byte 4 4) x) #xA) x)) ; => FFAF is perhaps a better example 2016-06-17T19:50:04Z jasom: dealing with arbitrary bitpacked data in lisp is so much nicer than C 2016-06-17T20:00:32Z jokleinn quit (Quit: WeeChat 1.5) 2016-06-17T20:04:10Z jokleinn joined #lisp 2016-06-17T20:04:59Z zdm joined #lisp 2016-06-17T20:05:44Z dougk_ quit (Remote host closed the connection) 2016-06-17T20:05:55Z warweasle quit (Quit: ttfn) 2016-06-17T20:09:13Z EvW joined #lisp 2016-06-17T20:16:38Z paule32: hello 2016-06-17T20:16:54Z paule32: does someone know how to install opencv: https://github.com/byulparan/common-cv 2016-06-17T20:16:55Z paule32: ? 2016-06-17T20:20:07Z fourier`: jasom: yes I'm reading about ldb 2016-06-17T20:22:10Z wccoder joined #lisp 2016-06-17T20:24:13Z PuercoPop: paule32: what happens after cloning it in local-projects and ql:quickloading it? (have you installed the opencv headers in your system as well)? 2016-06-17T20:25:42Z vlatkoB_ quit (Remote host closed the connection) 2016-06-17T20:27:30Z papachan quit (Read error: Connection reset by peer) 2016-06-17T20:32:01Z trinque joined #lisp 2016-06-17T20:34:33Z paul0 quit (Quit: WeeChat 1.0.1) 2016-06-17T20:35:01Z scymtym joined #lisp 2016-06-17T20:35:14Z emaczen quit (Ping timeout: 260 seconds) 2016-06-17T20:43:48Z shka quit (Ping timeout: 244 seconds) 2016-06-17T20:43:59Z harish quit (Ping timeout: 244 seconds) 2016-06-17T20:51:34Z Skinkitten joined #lisp 2016-06-17T20:53:55Z AntiSpamMeta quit (Excess Flood) 2016-06-17T20:54:17Z papachan joined #lisp 2016-06-17T20:54:18Z AntiSpamMeta joined #lisp 2016-06-17T20:54:34Z slyrus quit (Remote host closed the connection) 2016-06-17T20:54:51Z mac_ified quit 2016-06-17T20:59:01Z eni joined #lisp 2016-06-17T21:00:08Z emaczen joined #lisp 2016-06-17T21:01:44Z IPmonger joined #lisp 2016-06-17T21:03:25Z emaczen quit (Remote host closed the connection) 2016-06-17T21:03:40Z emaczen joined #lisp 2016-06-17T21:05:15Z vaitel quit (Quit: Leaving) 2016-06-17T21:05:55Z emaczen left #lisp 2016-06-17T21:06:22Z eudoxia joined #lisp 2016-06-17T21:07:03Z gravicappa quit (Ping timeout: 240 seconds) 2016-06-17T21:08:35Z IPmonger quit (Ping timeout: 260 seconds) 2016-06-17T21:17:16Z schaueho quit (Ping timeout: 264 seconds) 2016-06-17T21:17:54Z holly2 quit (Ping timeout: 244 seconds) 2016-06-17T21:21:37Z Skinkitten quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 2016-06-17T21:22:28Z IPmonger joined #lisp 2016-06-17T21:25:55Z holly2 joined #lisp 2016-06-17T21:25:56Z papachan quit (Read error: Connection reset by peer) 2016-06-17T21:26:56Z IPmonger quit (Ping timeout: 258 seconds) 2016-06-17T21:31:51Z fourier` quit (Ping timeout: 244 seconds) 2016-06-17T21:31:53Z onik joined #lisp 2016-06-17T21:32:29Z tos-1 quit (Ping timeout: 250 seconds) 2016-06-17T21:33:01Z grimsley joined #lisp 2016-06-17T21:33:57Z harish joined #lisp 2016-06-17T21:37:51Z mrcom joined #lisp 2016-06-17T21:37:55Z onik quit (Quit: Page closed) 2016-06-17T21:38:30Z elimik31 joined #lisp 2016-06-17T21:39:36Z mastokley quit (Ping timeout: 250 seconds) 2016-06-17T21:39:51Z wccoder quit (Remote host closed the connection) 2016-06-17T21:42:00Z papachan joined #lisp 2016-06-17T21:43:12Z eni quit (Ping timeout: 276 seconds) 2016-06-17T21:47:51Z Skinkitten joined #lisp 2016-06-17T21:47:59Z happy-dude quit (Quit: Connection closed for inactivity) 2016-06-17T21:48:19Z strykerkkd quit (Quit: Leaving) 2016-06-17T21:50:52Z LiamH quit (Quit: Leaving.) 2016-06-17T21:50:53Z IPmonger joined #lisp 2016-06-17T21:51:30Z puchacz quit (Quit: Konversation terminated!) 2016-06-17T21:54:15Z elimik31 quit (Ping timeout: 276 seconds) 2016-06-17T21:55:15Z IPmonger quit (Ping timeout: 246 seconds) 2016-06-17T21:58:09Z DougNYC joined #lisp 2016-06-17T21:59:58Z lisper29 joined #lisp 2016-06-17T22:03:09Z eudoxia_ joined #lisp 2016-06-17T22:04:57Z adolf_stalin quit (Quit: Leaving...) 2016-06-17T22:06:02Z papachan quit (Read error: Connection reset by peer) 2016-06-17T22:06:34Z eudoxia quit (Ping timeout: 240 seconds) 2016-06-17T22:07:10Z Skinkitten quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) 2016-06-17T22:07:15Z IPmonger joined #lisp 2016-06-17T22:08:05Z krasnal quit (Ping timeout: 260 seconds) 2016-06-17T22:09:37Z allezbluez quit (Quit: Leaving) 2016-06-17T22:11:34Z IPmonger quit (Ping timeout: 240 seconds) 2016-06-17T22:11:42Z wccoder joined #lisp 2016-06-17T22:12:47Z EvW quit (Ping timeout: 250 seconds) 2016-06-17T22:13:25Z fourier` joined #lisp 2016-06-17T22:14:16Z DeadTrickster quit (Ping timeout: 250 seconds) 2016-06-17T22:15:21Z __cot__ joined #lisp 2016-06-17T22:17:28Z IPmonger joined #lisp 2016-06-17T22:17:45Z DeadTrickster joined #lisp 2016-06-17T22:19:48Z frgo quit (Remote host closed the connection) 2016-06-17T22:21:04Z krasnal joined #lisp 2016-06-17T22:21:30Z EvW joined #lisp 2016-06-17T22:22:07Z IPmonger quit (Ping timeout: 252 seconds) 2016-06-17T22:25:14Z lisper29 quit (Quit: Leaving) 2016-06-17T22:27:00Z __cot__: hmm 2016-06-17T22:27:30Z __cot__: 'meaw 2016-06-17T22:27:47Z IPmonger joined #lisp 2016-06-17T22:29:21Z harish quit (Ping timeout: 276 seconds) 2016-06-17T22:29:54Z norfumpit quit (Ping timeout: 244 seconds) 2016-06-17T22:30:01Z pjb quit (Remote host closed the connection) 2016-06-17T22:30:50Z norfumpit joined #lisp 2016-06-17T22:32:29Z stepnem quit (Ping timeout: 244 seconds) 2016-06-17T22:32:29Z IPmonger quit (Ping timeout: 260 seconds) 2016-06-17T22:33:20Z defaultxr quit (Ping timeout: 250 seconds) 2016-06-17T22:34:01Z tsikov quit (Remote host closed the connection) 2016-06-17T22:39:29Z mejja joined #lisp 2016-06-17T22:47:12Z harish joined #lisp 2016-06-17T22:50:43Z IPmonger joined #lisp 2016-06-17T22:51:14Z angavrilov quit (Remote host closed the connection) 2016-06-17T22:51:38Z eudoxia_ quit (Remote host closed the connection) 2016-06-17T22:55:27Z IPmonger quit (Ping timeout: 260 seconds) 2016-06-17T22:59:09Z tsikov joined #lisp 2016-06-17T23:00:34Z __cot__: uhm 2016-06-17T23:01:49Z __cot__: you loaded a engine and the memmmmemmmmeorytimmin looks strange physically like oerflowing 2016-06-17T23:02:29Z unrahul quit (Quit: Connection closed for inactivity) 2016-06-17T23:02:36Z krwq quit (Remote host closed the connection) 2016-06-17T23:04:15Z Zotan quit (Remote host closed the connection) 2016-06-17T23:04:23Z EvW quit (Remote host closed the connection) 2016-06-17T23:04:43Z EvW joined #lisp 2016-06-17T23:10:10Z coyo quit (Ping timeout: 250 seconds) 2016-06-17T23:11:53Z clop joined #lisp 2016-06-17T23:12:49Z _sjs joined #lisp 2016-06-17T23:15:39Z attila_lendvai quit (Ping timeout: 260 seconds) 2016-06-17T23:17:14Z tsikov quit (Remote host closed the connection) 2016-06-17T23:17:54Z Ulster quit (Read error: Connection reset by peer) 2016-06-17T23:18:18Z Ulster joined #lisp 2016-06-17T23:21:52Z Portable_Cheese quit (Ping timeout: 250 seconds) 2016-06-17T23:22:31Z mastokley joined #lisp 2016-06-17T23:27:23Z coyo joined #lisp 2016-06-17T23:33:19Z NeverDie quit (Quit: http://radiux.io/) 2016-06-17T23:35:54Z NeverDie joined #lisp 2016-06-17T23:37:25Z zygentoma quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) 2016-06-17T23:37:49Z kobain quit (Ping timeout: 260 seconds) 2016-06-17T23:39:51Z whiteline quit (Remote host closed the connection) 2016-06-17T23:41:26Z whiteline joined #lisp 2016-06-17T23:41:35Z m_zr0 quit (Read error: Connection reset by peer) 2016-06-17T23:42:11Z m_zr0 joined #lisp 2016-06-17T23:44:20Z zdm quit (Ping timeout: 260 seconds) 2016-06-17T23:44:43Z tsikov joined #lisp 2016-06-17T23:45:03Z eudoxia joined #lisp 2016-06-17T23:45:55Z papachan joined #lisp 2016-06-17T23:46:08Z wccoder quit (Remote host closed the connection) 2016-06-17T23:47:32Z holycow quit (Quit: Lost terminal) 2016-06-17T23:47:42Z Zotan joined #lisp 2016-06-17T23:52:26Z tsikov quit (Remote host closed the connection) 2016-06-17T23:53:51Z therik quit (Ping timeout: 276 seconds) 2016-06-17T23:58:21Z fourier` quit (Ping timeout: 258 seconds)