00:00:00 --- log: started forth/07.04.25 00:00:40 --- quit: yumehito1 (Read error: 60 (Operation timed out)) 00:05:30 --- quit: yumehito_ (Connection timed out) 00:15:39 --- join: yumehito_ (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 00:21:24 --- quit: yumehito (Connection timed out) 00:36:58 --- nick: yumehito_ -> yumehito 00:53:27 --- quit: yumehito (Read error: 60 (Operation timed out)) 00:55:20 --- join: yumehito (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 01:27:31 --- join: Baughn (n=svein@084202038248.customer.alfanett.no) joined #forth 01:42:16 --- join: yumehito_ (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 01:53:46 --- quit: yumehito (Success) 01:53:47 --- join: yumehito1 (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 02:03:42 --- join: yumehito2 (n=yumehito@b-internet.87.103.254.70.snt.ru) joined #forth 02:05:15 --- quit: yumehito_ (Connection timed out) 02:14:39 --- quit: yumehito1 (Connection timed out) 02:23:17 --- join: ayrnieu (n=julian@pdpc/supporter/sustaining/ayrnieu) joined #forth 02:25:24 --- nick: yumehito2 -> yumehito 02:32:16 --- quit: Blandest_ (zelazny.freenode.net irc.freenode.net) 02:32:16 --- quit: JasonWoof (zelazny.freenode.net irc.freenode.net) 02:32:16 --- quit: Shain (zelazny.freenode.net irc.freenode.net) 02:32:17 --- quit: uiuiuiu (zelazny.freenode.net irc.freenode.net) 02:34:40 --- join: JasonWoof (n=jason@unaffiliated/herkamire) joined #forth 02:34:40 --- join: Blandest_ (i=user@S0106000fb09cff56.ed.shawcable.net) joined #forth 02:34:40 --- join: Shain (i=steve@adsl-75-30-114-21.dsl.pltn13.sbcglobal.net) joined #forth 02:34:40 --- join: uiuiuiu (n=ian@schihei.net) joined #forth 02:34:40 --- mode: irc.freenode.net set +o JasonWoof 04:02:51 --- join: skas_wk (n=skas@202-90-54-135.static.linearg.net) joined #forth 04:18:55 --- join: ygrek (i=user@gateway/tor/x-530de37441e75a36) joined #forth 04:32:16 --- quit: skas_wk (Read error: 110 (Connection timed out)) 05:04:25 --- join: brx` (n=brx@p57A780DC.dip0.t-ipconnect.de) joined #forth 05:07:01 --- join: ygrek_ (i=user@gateway/tor/x-2a2fac784d50dd65) joined #forth 05:12:56 --- quit: brx (Read error: 110 (Connection timed out)) 05:26:30 --- quit: ygrek (Remote closed the connection) 05:45:59 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 06:02:29 --- join: saon (n=saon@unaffiliated/saon) joined #forth 06:22:34 --- join: brx (n=brx@p57A7BB8F.dip0.t-ipconnect.de) joined #forth 06:37:08 --- quit: brx` (Read error: 110 (Connection timed out)) 06:37:28 --- join: brx` (n=brx@p57A7B7B5.dip0.t-ipconnect.de) joined #forth 06:44:43 --- quit: brx (Connection timed out) 06:47:29 --- join: segher__ (n=segher@dslb-084-056-193-197.pools.arcor-ip.net) joined #forth 07:02:05 --- quit: segher_ (Read error: 110 (Connection timed out)) 07:02:13 --- quit: JasonWoof (Read error: 54 (Connection reset by peer)) 07:02:21 --- join: JasonWoof (n=jason@c-71-192-30-169.hsd1.ma.comcast.net) joined #forth 07:02:21 --- mode: ChanServ set +o JasonWoof 07:06:06 --- join: skas_wk (n=skas@202-90-54-135.static.linearg.net) joined #forth 07:07:21 --- quit: ygrek_ (Remote closed the connection) 07:08:07 --- join: ygrek_ (i=user@gateway/tor/x-a2bb4ea9569fdf3a) joined #forth 07:23:03 --- quit: Quartus__ (Read error: 104 (Connection reset by peer)) 07:24:05 --- join: madgarden (n=madgarde@bas2-kitchener06-1096651787.dsl.bell.ca) joined #forth 07:27:09 --- join: brx (n=brx@p57a7ad40.dip0.t-ipconnect.de) joined #forth 07:37:33 --- join: brx`` (n=brx@p57A7AAF2.dip0.t-ipconnect.de) joined #forth 07:42:54 --- quit: brx` (Read error: 110 (Connection timed out)) 07:44:15 --- quit: brx (Connection timed out) 07:44:25 --- quit: ecraven ("bbl") 08:00:04 --- quit: ygrek_ (Remote closed the connection) 08:00:52 --- join: ygrek_ (i=user@gateway/tor/x-8845020fdf50c9b5) joined #forth 08:06:57 --- join: azekeprofit (i=azekepro@88.204.193.157) joined #forth 08:06:59 --- quit: azekeprofit (Client Quit) 08:18:48 --- quit: saon (Read error: 110 (Connection timed out)) 08:32:29 --- quit: ygrek_ (Remote closed the connection) 08:42:46 --- join: segher_ (n=segher@dslb-084-056-198-218.pools.arcor-ip.net) joined #forth 08:44:57 --- quit: nighty-- (Remote closed the connection) 08:45:48 --- join: nighty- (n=nighty-@66-163-28-100.ip.tor.radiant.net) joined #forth 08:47:29 --- quit: TreyB ("Changing server") 08:47:31 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 08:51:59 --- quit: segher__ (Read error: 110 (Connection timed out)) 08:52:08 --- join: Quartus__ (n=Quartus_@209.167.5.2) joined #forth 08:54:40 --- quit: ccfg_ (zelazny.freenode.net irc.freenode.net) 08:54:40 --- quit: warp0x00 (zelazny.freenode.net irc.freenode.net) 08:54:41 --- quit: OrngeTide (zelazny.freenode.net irc.freenode.net) 08:54:41 --- quit: gnomon (zelazny.freenode.net irc.freenode.net) 08:54:45 --- join: ccfg (n=ccfg@dsl-roigw1-fe8ade00-21.dhcp.inet.fi) joined #forth 08:54:49 --- join: warpzero (n=warpzero@208.74.136.138) joined #forth 08:54:51 --- join: OrngeTid1 (i=orange@orangetide.com) joined #forth 08:54:53 --- join: gnomon (n=gnomon@74.103.34.22) joined #forth 09:45:13 --- join: brx (n=brx@p57A78B9B.dip0.t-ipconnect.de) joined #forth 09:56:06 --- join: ygrek_ (i=user@gateway/tor/x-d6caa42933612a2e) joined #forth 09:57:35 --- quit: Quartus__ (Read error: 104 (Connection reset by peer)) 09:59:36 --- join: brx` (n=brx@p57a78a4b.dip0.t-ipconnect.de) joined #forth 10:00:03 --- quit: brx`` (Read error: 110 (Connection timed out)) 10:07:21 --- quit: brx (Read error: 110 (Connection timed out)) 11:38:24 --- join: msingh (n=msingh--@cust0520.wa01.aanet.com.au) joined #forth 11:38:26 hello 11:38:35 hi 11:40:13 http://forth.pastebin.ca/458115 11:40:23 is the code in that link good style? 11:41:02 except for the indentation, yes 11:41:52 awesome. thanks :) 11:42:11 but it's a trivial program 11:42:15 hard to write 'fib' in bad style 11:42:50 hehe 11:47:09 --- quit: msingh ("Leaving") 11:53:02 isn't it it supposed to be: function fib(x) { return fib(x-1) + fib(x-2); } 11:53:44 no, that's javascript 11:55:18 --- join: brx (n=brx@p57A7A53B.dip0.t-ipconnect.de) joined #forth 11:56:40 I mean "1- recurse" and "2- recurse" 11:56:51 he's got "1- recurse" in there twice 11:57:08 look at the stack shuffling more closely 11:57:12 he does 1- then dup's it 11:59:42 --- join: edrx (n=Eduardo@fosforo.k8.com.br) joined #forth 12:05:02 --- quit: brx` (Read error: 110 (Connection timed out)) 12:05:55 what's up with the new ls command? 12:06:02 huh? 12:06:11 it's sorting as though everything was lowercase and ignoring the periods at the beginning of some filenames 12:06:17 how do I get it not to do this? 12:07:16 I maybe could get used to the capitals thing, but I hate it mixing all the invisible files 12:08:20 info ls 12:09:40 you might just need to set your locale to something more sane 12:13:31 try LANG=C ls and see if that is better 12:17:55 beauty. thank you 12:18:05 --- quit: ygrek_ () 12:18:12 case-sensitive sorting is somewhat of an anachronism 12:19:42 right 12:19:52 I like it that way because it's always been done that way 12:20:00 yeah 12:20:13 many (probably most) programming projects capitalize some special files so they will sort apart from the rest at the top 12:20:18 like README and Makefile 12:20:25 COPYING, etc 12:21:03 many GPL'd projects, written in C, perhaps :) 12:21:20 a typical java app won't have a Makefile :) 12:21:34 certainly the vast majority of programming projects I've seen 12:21:47 java folks have weird ideas about capitalization 12:22:02 you mean the vast majority of open sourced projects you've seen, that were written in C? 12:22:32 that's true too, but not what I said 12:22:38 i've only ever worked on one project that was GPL'd, and only one project that used a Makefile 12:22:44 and these are two different projects 12:23:13 most source code I've looked at was probably GPL'd 12:23:22 that's odd 12:23:30 why? 12:23:37 why would I want to look at code that I can't use? 12:23:39 i'm not saying that as an insult 12:23:48 didn't take it that way 12:23:50 just that most programmers spend most of their time looking at mostly proprietary code :) 12:23:50 but I'm curious 12:23:56 ahh 12:23:59 you're lucky if you get to work on OSS code 12:24:04 at your job 12:24:04 yeah, I've seen a whole lot of proprietary php code 12:24:30 I don't look at much GPL'd code because my current open source project is released under a BSD license 12:24:37 but, even in the proprietary php, capitalized filenames are rare, and usually reserved for README 12:24:50 sure, that makes sense 12:25:12 I think in my life I've probably spent more time on hobby projects than payed programming work 12:25:22 me too, probably 12:25:35 but then i've been doing hobby programming since i was 12 :) 12:25:47 although lately I've been spending a bunch of time working and very little time on my hobby programming projects 12:25:55 :) 12:26:11 I started dabbling at about 13 12:26:23 and got seriously addicted at 14 or 15 12:27:12 the unfortunate thing about most of my experience looking at other people's code is that I usually only look if it's broket 12:27:16 broken 12:28:11 I run linux on a mac at home, and like to try programs before they are released and heavily tested on my rare platform 12:28:23 so I've opened up lots of things to hack them a little and get them to build 12:28:44 --- part: edrx left #forth 12:28:56 and I've been a professional sysadmin for 1-3 servers for about 5 years 12:29:50 perhaps some day I should spend some time reading some really well written code 12:29:57 see if I can't learn something 12:30:06 I've heard the source for grep is good read 12:30:21 i don't like reading C code 12:30:40 I don't like writing it particularly 12:30:54 although for some tasks it doesn't get in the way too much 12:34:37 lunch. bbiab 12:35:09 --- join: warp0x00 (n=warpzero@208.74.136.138) joined #forth 12:35:09 --- quit: warpzero (Read error: 104 (Connection reset by peer)) 12:37:14 --- join: brx` (n=brx@p57A7B695.dip0.t-ipconnect.de) joined #forth 12:40:27 --- join: brx`` (n=brx@p57A7B639.dip0.t-ipconnect.de) joined #forth 12:45:03 --- quit: brx (Read error: 110 (Connection timed out)) 12:55:10 --- quit: brx` (Connection timed out) 13:06:05 mmmm 13:06:06 meat 13:14:25 --- join: brx (n=brx@p57A7A9B3.dip0.t-ipconnect.de) joined #forth 13:22:14 --- quit: brx`` (Read error: 110 (Connection timed out)) 13:28:24 --- quit: timlarson_ ("Leaving") 13:29:27 http://jroller.com/page/Solomon?entry=compiling_xml_for_faster_startup 13:29:37 this guy found that his java app, which took 30 seconds to start, was reading 243 xml files on startup 13:29:47 some files were read more tha n once 13:37:38 --- join: saon (n=saon@unaffiliated/saon) joined #forth 13:49:20 --- join: brx` (n=brx@p57A7ADF6.dip0.t-ipconnect.de) joined #forth 14:00:18 --- quit: brx (Read error: 110 (Connection timed out)) 14:14:44 --- join: brx (n=brx@p57a7c650.dip0.t-ipconnect.de) joined #forth 14:17:50 --- join: Quartus__ (n=Quartus_@209.167.5.1) joined #forth 14:22:30 --- join: brx`` (n=brx@p57a7a6ad.dip0.t-ipconnect.de) joined #forth 14:23:02 --- quit: brx` (Read error: 110 (Connection timed out)) 14:28:43 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 14:28:43 --- mode: ChanServ set +o tathi 14:32:14 --- quit: brx (Read error: 110 (Connection timed out)) 14:35:27 --- join: brx (n=brx@p57A7AAD1.dip0.t-ipconnect.de) joined #forth 14:38:35 heh 14:38:37 good lord 14:40:14 I think reading one xml file at startup is a bit much 14:40:47 and more than say 3 would be excessive 14:40:48 i think that thinking about using xml is too much 14:41:08 heh 14:41:18 yeah, that can get me a little agitated :-P 14:42:18 well the problem is that java doesn't have a good way of representing symbolic data natively, so a lot of stuff ends up as xml, or .ini-style files, etc 14:44:03 --- quit: brx`` (Read error: 110 (Connection timed out)) 14:47:57 if you just want a file format to dump java data into, and then read it back in later, xml is a terrible choice 14:48:12 only use a "human readable" format if you need to have humans reading it 14:48:30 well yes, i'm talking about stuff like hibernate mappings and spring bean wiring 14:48:32 humans write that 14:48:42 otherwise use something with length counts and ints stored in binary 14:49:00 I don't know what that stuff is (hibernate and beans) 14:49:05 i wonder if that type of file is actually faster to parse than text 14:49:26 also, xml is one of the hardest to read "human readable" formats I've come accross 14:49:35 and it's quite complex to parse too 14:50:14 i wouldn't say it's complex to parse, but it is a pain to read for a human 14:50:24 and writing xml without a special tool is painful too 14:50:29 it's more complex to parse than the other formats I've seen 14:50:48 --- quit: skas_wk ("Leaving") 14:50:59 I'm now using yaml for my addressbook 14:51:16 I edit by hand (vim) and have a script that looks up e-mail addresses from it based on name, or nickname 14:51:28 do you have a forth yaml parser? 14:51:35 no 14:51:38 ruby 14:52:07 I experimented with ruby for a bit 14:52:20 very cool language. I'd actually use it if it wasn't so amazingly, astoundingly slow 14:52:46 maybe one of these years a decent implementation will come along 14:52:59 jruby is already faster than c ruby 14:53:05 but it's incomplete 14:53:16 jruby is an implementation of the ruby language in java? 14:53:20 yes 14:53:24 that's funny 14:53:37 it's the startup/parsing time that's a problem for me 14:53:45 i doubt the java version is faster at that 14:53:49 I haven't done anything in ruby that needs to do actual computation or anything quickly 14:54:00 it's faster at actually running ruby code, because it compiles it to JVM bytecode which is then compiled to native code etc 14:54:07 right 14:54:10 i imagine the startup time is terrible 14:54:13 that's not so suprising 14:54:34 I wonder how long it will be before a faster implementation comes along 14:54:37 startup time is why sun (retroactively) re-focused java on server-side apps that never restart... 14:54:43 it's happening with perl now right? 14:54:45 parot or something 14:54:54 if you want a fast dynamic language look at lisp 14:55:12 lisp has a certain draw for me 14:55:20 sbcl can pre-compile source files, even 14:55:21 but I'm not sure I'm willing to tollerate the syntax 14:55:28 the syntax is great once you learn it 14:55:37 it is the way it is for a reason 14:55:53 but all those (()()))()()))())() 14:56:08 what about ruby? all those ()(;:{} 14:56:31 it's a superficial complaint 14:56:40 somewhat 14:56:50 but to code in lisp I have to type and read those all the time 14:56:53 ruby is basically java with dynamic typing. lisp has nice abstractions that allow you to build neat DSLs 14:57:09 what's DSL? 14:57:13 domain-specific language 14:57:29 hmmm 14:57:35 i find java, ruby, etc code can be quite verbose and full of boilerplate 14:57:41 and it's hard to abstract certain things out in those languages 14:57:46 maybe I wouldn't hate java so much if it were fast on my computer 14:57:59 huh 14:58:01 java's performance is not a problem to me, it's the syntax and libraries 14:58:07 everything is such a pain to do 14:58:08 I haven't used ruby enough to find it's limitations 14:58:16 well, i guess ruby suffices for short scripts 14:58:22 and smallish web apps 14:58:27 that's all I've done 14:58:31 just a few scripts 14:58:32 fair enough 14:58:40 I was suprised how easy it was to do 14:58:54 you should try using forth instead :) 14:59:02 I've never used a language that had easy to use/understand/learn libraries 14:59:04 much 14:59:51 huh... one of the options gentoo gives me for installing sbcl is "source" 14:59:54 wonder what that does 15:00:05 sbcl is written in common lisp 15:00:18 so i guess it downloads a binary of sbcl, then the source, then builds the source using that binary and installs an ew binary 15:00:30 you also need gcc to build it, part of it is in c... 15:01:16 neat 15:01:40 would building with the "unicode" option annoy me? 15:01:52 i don't know 15:02:00 last time i used sbcl was before the unicode changes 15:02:20 i'm not sure but i think if you don't use unicode characters your strings are still 8 bits 15:02:26 --- join: crest_ (n=crest@p5489e9c9.dip.t-dialin.net) joined #forth 15:02:34 good 15:02:56 I have no use for unicode, so it's either useless, or gets in my way 15:03:27 well i think in sbcl's case you just get some extra functions for reading/writing streams with different encodings and such 15:04:20 you should try doing your scripting in forth. build libraries that you need as you go along 15:04:22 forth needs libraries 15:05:35 yeah, I did that 15:05:36 mars needs women 15:05:41 lol 15:05:52 hey quara 15:05:54 Quartus: 15:06:26 I found that I wanted a body of functions to manipulate dynamically allocated strings 15:06:29 and lost interest 15:06:46 heh 15:07:13 I'm not particularly interested in garbage collection right now 15:07:25 Hey Quartus. Have you decided if you want the database? 15:07:42 ALL YOUR DATABASE ARE BELONG TO US 15:07:56 I think so Blandest, just sorting out whether I have the req'd infrastructure 15:09:21 slava: can you recommend good learning materials to get me started with sbcl? 15:09:34 I've done the very very basic lisp stuff a year or two ago 15:09:46 http://www.gigamonkeys.com/book/ 15:09:53 so, kinda square one, but I've learned many programming languages 15:09:58 thanks 15:10:19 http://www.sbcl.org/manual/ -- once you're familiar with CL, read this to learn about SBCL extensions 15:10:25 actually you can read it at any time 15:12:06 I think I'm going to write a simple FastCGI server in C 15:12:16 how come? 15:12:32 licensed under the GPL. anybody know some nice code I could start with so I don't have to work out the polling? 15:13:06 slava: I wrote a little website that does on the order of 6,000 database accesses per request 15:13:29 it was a bit slow with php/mysql 15:13:32 sounds like you need some caching and db connection pooling 15:13:50 but the DB would work great as an array of structures 15:13:53 all accesses are by index 15:14:16 by "database accesses" I mean fetching that many records from the database 15:14:38 oh, ok 15:14:43 not 6000 individual queries 15:14:44 I have about 26 bytes of data per record 15:15:02 --- quit: Quartus__ ("used jmIrc") 15:15:07 6000 queries I think 15:15:10 funny how php's lack of support for data types forces people to use a db for everything 15:15:18 all accessed by id number 15:15:22 which could as well be array index 15:15:27 the database is < 1MB at first 15:15:36 and I don't expect it to ever get above 100MB 15:15:43 seems like it would work well as a memory mapped file 15:16:25 yup 15:16:27 can php do that? 15:16:40 factor got an mmap library recently. it works on unix and windows 15:17:18 php could do fopen(), fseek() etc 15:17:27 which I should consider using 15:17:35 but I have to deal with timing stuff 15:17:37 --- quit: Crest (Read error: 110 (Connection timed out)) 15:17:42 timing stuff? 15:18:08 two different php threads/processes trying to read/write to the DB at once 15:18:19 oh, mutual exclusion 15:18:34 FCGI appeals to me because I can have one thread that just fulfills requests one at a time 15:18:41 and I don't have to worry about any of that 15:18:47 what is this data? 15:18:52 right! that's what MUTEX stands for 15:19:05 lemme see if I have a demo up 15:19:17 I wrote it in php/mysql, then recoded the db so it was php/db4 15:19:30 but php/db4 doesn't work on my server for some reason 15:19:34 no i mean what does the data represent 15:19:38 and it was only 2x faster anyway 15:19:48 pixels 15:19:57 colors in squares 15:20:01 hmm 15:20:03 at different zoom depths 15:20:09 not quite pixels 15:20:23 man I'm vague... 15:20:39 image data, i gotcha 15:21:00 the app is a square. 15:21:06 you can zoom in 15:21:20 I think this demo is working: http://home.jasonwoof.org:2201/square/ 15:21:42 when it's done you'll be able to edit also 15:21:46 at any zoom level 15:21:54 that's cool 15:22:01 when you edit you toggle all the black/white in the square you clicked on 15:22:15 so the database is really just keeping track of which squares are "toggled" 15:23:03 the recursive algorithm that fetches the data from the database and colors the square is pretty simple 15:23:46 yup 15:24:02 it's stored as a tree structure 15:24:06 each done has 4 children 15:24:20 (links, zero for no child, or it's array index) 15:24:23 if i was doing this in factor i'd have one factor thread responsible for reading/writing an mmap'd data file, then http request threads would use messaging to get pixel data from that thread 15:25:10 right 15:25:20 basically I'm thinking of using FCGI to arbitrate the messaging 15:26:38 the "request" messages are simple, they are just the square's ID (array index) and optionally to zoom into one of the four children, or out 15:27:21 it returns the resulting square's ID and the 8KB bitmap 15:28:07 I'm not sure how I'll handle zooming into regions that have no children (ie they are all one color) 15:28:15 I might not allow that in the interface 15:28:29 but some how the interface needs to know that this is trying to happen 15:28:56 later there will be another message, which is "toggle square xxx" 15:29:15 which just needs the respons "Ok" 15:29:42 I had fun hacking up that front end 15:29:58 I haven't done much javascript, and it was nice to do something tricky like that 15:30:09 even does the asynchronus thing everybody's all excited about 15:30:46 --- join: Quartus__ (n=Quartus_@209.167.5.1) joined #forth 15:31:33 the javascript front end gets the bitmap from the server, and encodes it into 16 little PNGs which it sticks in as the background images on the
s 15:32:36 I should probably hack it so it only breaks it into 4 15:34:43 hehe, the compiler output for "emerge sbcl" looks to be valid lisp code (every line starts with "; ") 15:34:53 heh 15:36:53 LOL, well, having read the first two sentances of the lisp book, I must say I'm very happy with it. 15:37:04 Here's the first sentence from the introduction: If you think the greatest pleasure in programming comes from getting a lot done with code that simply and clearly expresses 15:37:07 your intention, then programming in Common Lisp is likely to be about the most fun you can have with a computer. 15:37:22 rock on! 15:37:27 well, try to read more than two sentences; ) 15:37:36 the intro is a bit 'sales-pitchy'. 15:37:40 all in due time 15:37:42 don't pay too much attention to it 15:38:07 the intro looks a bit long, so I wasn't planning on reading it all 15:53:14 --- join: skas_wk (n=skas@121.127.198.32) joined #forth 16:08:44 --- join: brx` (n=brx@p57A7C11B.dip0.t-ipconnect.de) joined #forth 16:19:54 --- quit: brx (Read error: 110 (Connection timed out)) 16:21:10 STYLE-WARNING: Couldn't grovel for SIGEMT (unknown to the C compiler) 16:23:17 interesting message 16:23:20 moving on... 16:30:58 sbcl doesn't seem to have commandline history 16:31:01 is there some way to get it? 16:31:16 (I'm pushing the up arrow, and I just get the escape sequence, not my previous line of input) 16:39:47 And, I get another chuckle: 16:39:50 Technically, you could have also used FORMAT to loop over the database itself, turning our dump-db function into a one-liner. 16:39:53 (defun dump-db () (format t "~{~{~a:~10t~a~%~}~%~}" *db*)) 16:39:55 That's either very cool or very scary depending on your point of view. 16:43:23 --- join: brx (n=brx@p57A790AA.dip0.t-ipconnect.de) joined #forth 16:50:57 --- quit: brx` (Read error: 110 (Connection timed out)) 16:58:36 --- join: brx` (n=brx@p57A79258.dip0.t-ipconnect.de) joined #forth 16:59:39 I still don't totally understand some of the quoting 16:59:47 they give this example: (remove-if-not #'(lambda (x) (= 0 (mod x 2))) '(1 2 3 4 5 6 7 8 9 10)) 16:59:57 the #' seems unnessesary to me 17:00:10 it works just fine without it 17:01:05 this example is right after this: The funny notation #' 17:01:05 is shorthand for "Get me the function with the following name." 17:01:57 (this text is talking about the previous example, but then they follow it with an example of a function without a name) 17:04:05 I don't feel qualified to answer Common Lisp questions in the general case, but in this particular one I think that the reason for the hashquote is a matter of style and consistency: you may not need it in *this* case, but you'll need it in most, so commit it to muscle memory and forget about it for now. 17:11:42 yeah 17:12:01 they're trying to gloss over it and I want to know the gorry details now 17:12:59 I guess I wish that they're english meaning was something that at least held true for their examples on that page, like eg "the following is a function, not a variable" 17:13:29 --- join: brx`` (n=brx@p57a78c64.dip0.t-ipconnect.de) joined #forth 17:14:02 --- quit: brx (Read error: 110 (Connection timed out)) 17:15:22 If you bound the value of the lambda expression to a variable and then called remove-if-not, you'd need the hashquote. 17:15:46 It's because Common Lisp has a separate namespace for functions. A mistake, that. 17:21:17 --- quit: brx` (Read error: 110 (Connection timed out)) 17:21:31 thought it was the other way around 17:21:41 you need the #' if it's NOT a variable 17:22:21 eg (setf foo (lambda (x) (equal x "foo)) 17:22:41 (remove-if-not foo ("snotehu" "foo")) 17:22:52 yeah, I wish variables and functions used the same namespace 17:23:12 seems to me it'd be a bad idea to have functions and variables have the same names 17:37:06 coool 17:37:13 I'm starting to grok lisp macros 17:37:26 gnomon: separate namespace for functions is not a mistake! 17:37:41 JasonWoof: #'foo is short for (function foo) 17:37:48 and 'foo is (quote foo) 17:38:00 #' before lambda is optional 17:38:12 lambda is a macro so (lambda ...) becomes (function (lambda ...)) 17:40:03 --- quit: tathi ("leaving") 17:45:44 I was hoping there'd be a logical reason for the seperation of function names and variable names 17:45:47 I'm sure they'll get to that 17:46:34 well, a function is not a variable 17:46:56 you can pass a function value in a variable, but that's not the same as having a defined function 17:47:53 functions have their own namespace because this namespace works differently. 17:48:19 oop, brain just melted 17:48:27 don't worry about it for now 17:48:40 just remember, purple monkey midnight umbrella. 17:48:49 if you ever learn scheme, you'll see what it's like when functions anad variables share the same namespace. i find it odd and annoying 17:48:58 but in practice it's not a big difference 17:49:03 it's a very minor style issue 17:49:51 "collecting" is part of the "loop" construct right? 17:50:15 depends on context, i guess. technically collecting is just a symbol. you could use it for anything. i don't suggest looking at loop until later. 17:50:52 yeah... I noticed that loop was in chapter 22 17:50:53 :) 17:51:03 i don't remember if loop uses 'collecting' as a term or not. 17:51:05 which seems a mighty high chapter number 17:51:10 ok, that's fine 17:51:13 i've only used loop for iterating, not creating new sequences 17:51:18 I'm approaching overload as it is :) 17:51:22 (loop for x in '(1 2 3 4) minimizing x) 17:51:42 some people hate loop 17:52:02 you can do everything just using higher-order functions in the library. 17:52:19 sometimes loop is a bit more readable, other times you're left scratching your head. the loop syntax is pretty ad-hoc 17:52:39 i'd use it sparingly, if at all. 17:52:39 they have list foo, and do: (loop while foo collecting (......)) 17:52:50 where ....... contains (pop foo) a couple times 17:53:10 (pop foo) is the same as (setf foo (cdr foo)) 17:53:16 did you get to car/cdr yet? :) 17:53:20 no 17:53:25 head/tail if a list. 17:53:31 cl actually defines aliases head and tail 17:53:32 I know what they mean though 17:53:39 ok 17:53:46 first item, and all others 17:53:51 also in CL, the empty list serves like a null, or boolean false 17:54:10 so (loop while foo ... (pop foo) ...) removes items one by one from the head, and does something until the list is finished 17:54:23 right 17:54:31 that's a strange idiom though. better to 'map' over the list with a lambda. 17:54:49 I think the reason he used that construct is that he needed to use up two elements from the list each time through the loop 17:55:00 otherwise I'm sure he would have used a simpler foreach sort of loop 17:55:04 right 17:55:55 there is a lot of overlap between certain CL features 17:56:00 you could literally cut half of the language out 17:56:22 design by committee, and all that :) but I think CL is one of the few decent design by committee languages 17:56:30 it could be a lot cleaner 17:56:43 but it's a breath of fresh air after java 17:58:40 coming from java, the best thing about CL is that you don't need all this XML configuration. in CL, you can create a source file data.lisp, 17:58:54 (defparameter *stuff* '(foo (bar 1 2) (baz "hllo") ... random crap ...)) 17:59:01 then somewhere in your code, (load "stuff") 17:59:08 or (load "data") 17:59:23 the java people will be writing xml configuration code to read their data.xml 18:00:37 --- join: brx (n=brx@p57A7C0AD.dip0.t-ipconnect.de) joined #forth 18:10:04 yeah, this book so far is building a database 18:10:11 and they just write it to a file as lisp code 18:16:00 --- quit: brx`` (Read error: 110 (Connection timed out)) 18:23:16 fascinating 18:23:19 I just finished chapter 3 18:23:53 in forth I generate code directly 18:23:59 and have functions that can generate code 18:24:31 but in lisp you can generate expressions that are still lists, or can be used as code 18:24:42 in that chapter we created expressions 18:25:48 and then made a macro, that created as many expressions as warrented by the parameters to the macro 18:26:04 then wrapped those in another expression and returned the whole mess as a function 18:28:30 --- join: brx` (n=brx@p57a7b693.dip0.t-ipconnect.de) joined #forth 18:37:51 --- quit: brx (Read error: 110 (Connection timed out)) 18:40:35 crazy lisp deviants! :) 18:45:40 --- quit: Quartus () 18:46:20 --- join: Quartus (n=neal@CPE0001023f6e4f-CM013349902843.cpe.net.cable.rogers.com) joined #forth 18:46:20 --- mode: ChanServ set +o Quartus 18:48:09 --- join: brx (n=brx@p57A7B0C0.dip0.t-ipconnect.de) joined #forth 18:48:53 --- quit: Blandest_ () 18:50:20 --- quit: Quartus (Client Quit) 18:58:33 --- join: brx`` (n=brx@p57A7AF1B.dip0.t-ipconnect.de) joined #forth 19:03:39 --- quit: brx` (Read error: 110 (Connection timed out)) 19:06:05 --- quit: brx (Read error: 110 (Connection timed out)) 19:16:50 --- join: brx (n=brx@p57a7a77b.dip0.t-ipconnect.de) joined #forth 19:29:46 --- join: nighty^ (n=nighty@sushi.rural-networks.com) joined #forth 19:31:22 --- join: brx` (n=brx@p57A7A503.dip0.t-ipconnect.de) joined #forth 19:32:19 --- quit: brx`` (Read error: 110 (Connection timed out)) 19:34:35 --- join: brx`` (n=brx@p57A7A277.dip0.t-ipconnect.de) joined #forth 19:38:24 --- quit: brx (Read error: 110 (Connection timed out)) 19:50:43 --- quit: brx` (Read error: 110 (Connection timed out)) 20:15:28 --- quit: Quartus__ (Read error: 145 (Connection timed out)) 20:38:22 --- join: brx (n=brx@p57A79121.dip0.t-ipconnect.de) joined #forth 20:40:05 --- join: brx` (n=brx@p57A78F76.dip0.t-ipconnect.de) joined #forth 20:45:58 --- quit: brx`` (Success) 20:48:00 is there better syntax for this: (defmacro pass-twice (sym arg) `(,sym ,arg ,arg)) 20:54:55 --- quit: brx (Read error: 110 (Connection timed out)) 20:59:05 --- join: brx (n=brx@p57A78D92.dip0.t-ipconnect.de) joined #forth 21:06:31 --- quit: brx` (Connection timed out) 21:35:27 --- join: brx` (n=brx@p57a78628.dip0.t-ipconnect.de) joined #forth 21:41:48 --- quit: nighty^ ("Disappears in a puff of smoke") 21:47:15 --- join: brx`` (n=brx@p57A78670.dip0.t-ipconnect.de) joined #forth 21:51:28 --- quit: brx (Read error: 110 (Connection timed out)) 21:54:07 --- quit: brx` (Read error: 110 (Connection timed out)) 21:55:02 --- quit: saon ("leaving") 23:00:54 --- join: brx (n=brx@p57A79E50.dip0.t-ipconnect.de) joined #forth 23:16:20 --- quit: brx`` (Read error: 110 (Connection timed out)) 23:30:17 --- join: brx` (n=brx@p57a7c374.dip0.t-ipconnect.de) joined #forth 23:34:25 --- join: ecraven (i=nex@eutyche.swe.uni-linz.ac.at) joined #forth 23:38:34 --- quit: brx (Connection timed out) 23:43:37 --- join: DocPlatypus (n=doc@mousetrap.platypuslabs.org) joined #forth 23:52:53 --- quit: DocPlatypus ("Leaving") 23:59:59 --- log: ended forth/07.04.25