freenode/lisp - IRC Chatlog

Search
20:55:26 francogrex it's a pity there are so many good start for packages and then they quickly become abandon-ware such as https://github.com/xach/linj, https://sourceforge.net/projects/jacol/ and http://jfli.sourceforge.net/ to name a few
20:55:50 francogrex I wonder why so much effort and then drop it...
20:56:30 Shinmera Because people are not constants.
20:56:42 francogrex not to mention even heavy weight projects such as Stella, corman-lisp ...
20:59:02 pjb francogrex: well, take Linj for example.
20:59:18 pjb What purpose does it serve?
20:59:56 pjb The only purpose of Linj, is to reassure a Common Lisper, that if he cannot find a CL job, but a Java job, he'll still be able to write sexps and provide his employer Java sources.
20:59:57 francogrex pjb: I am using it a lot these days :(
21:00:12 francogrex not only that
21:00:16 pjb Unfortunately, this is useless, because when you have a Java gig, you don't write new java code, you patch existing java code!
21:00:25 francogrex i am developing android apps using it
21:00:58 pjb Are you alone? Don't you maintain it? Is it abandonware if somebody uses it?
21:01:54 pjb Anyways, my answer is that a lot of such projects are not aimed at a big market but only gives some psychogical comfort to their author.
21:01:56 francogrex i am alone unfortunately. those are toy apps for my amusement, but i can see the potential... same for other tools i mentioned
21:02:19 francogrex it does give a comfort
21:02:38 francogrex pjb: however Stella was aimed at bigger projects
21:02:47 pjb So your query raises an important point: we should select projects targetting the general public. Things like dim's sql thingy.
21:03:01 Shinmera francogrex: I don't understand where your confusion stems from. People's interests and needs shift all the time. And even with large effort project, at some point there's diminishing returns.
21:03:32 francogrex they built a large system with it apparently the so-called PowerLoom
21:03:52 pjb francogrex: it's the same thing as linj. Look, people are even complaining when they come after a "smart" programmer who wrote too "advanced" code.
21:03:55 francogrex Shinmera: right
21:04:04 francogrex I just find it a pity
21:04:31 francogrex !? who complains about that?
21:04:42 pjb python as the thing for it, that it has only statements and no expression: people are forced to write plain procedural code. Most people would have their brain exploding if they saw a functional expression!
21:05:32 pjb So Stella might be very nice, and you or me could be using it to very good effect. But most of our coworkers wouldn't be able to maintain it.
21:05:44 pjb They'd just rewrite the thing in C++ or Java.
21:06:03 pjb Just like they did at Yahoo with ViaWeb, or anywhere else where they rewrote lisp projects in C or whatever.
21:06:50 pjb Anyways, nowadays Android development is not done in Java anymore. So your using Linj to generate Java is outdated. Now it's Kotlin.
21:07:02 francogrex most notable example that comes to mind is R
21:07:02 pjb Same wit iOS, Objective-C is out, nowadays it's all Swift
21:07:18 francogrex started out lisp and switched to C & C++ too
21:07:26 francogrex right
21:07:34 pjb (and where you LoL, is when you realize how close Swift and Kotlin are, and they weren't able to design a common language…)
21:08:57 attila_lendvai kotlin: where the frontpage brags about semicolons being optional... oh, the progress!
21:09:16 pjb :-)
21:09:39 shka_ i think that Stella is good for what is worth
21:10:08 shka_ i tried it, i hope i can use it for work
21:10:10 pjb Uncle Bob explained it nicely: we double the number of programmers every 5 years. Therefore half of the workforce is entirely unexperimented, constantly, it has been the same forever.
21:10:28 francogrex ACTION is puzzled by the waste... but yeah what can we do..
21:10:39 Shinmera What you can do is pick up the waste and finish it.
21:10:59 Shinmera Instead of yammering about what other people do or do not do with their time
21:11:02 pjb So the code you write, will have to be maintained by newbies who don't know anything. The code you will have to maintain, will have been written by newbies who don't know what they're doing.
21:11:05 Josh_2 pjb: what do you mean by "entirely unexperimented"
21:11:13 shka_ francogrex: i actually work in R recently
21:11:15 Josh_2 ahh
21:11:22 pjb And constantly newbies will come with "new" languages, "new" tools, and "new" methods.
21:11:35 pjb Josh_2: when you have less than 5 years of experience.
21:11:49 francogrex R was in lisp or scheme originally yeah but it's all the same in the end...
21:11:57 shka_ can't hope but think that it would be way better if they just sticked with lisp
21:12:40 Josh_2 pjb: Thanks. Few more years and I won't be in that category :O
21:12:57 shka_ it is way to much hassle to support whole language for just what R is
21:13:02 shka_ or S for that matter
21:13:31 shka_ and mind you, i actually kinda like R
21:13:56 shka_ it is pain to debug, and a bit clunky, but it is interesting design
21:14:14 shka_ anyway, good night all
21:14:39 jmercouris shka_: goodnight
21:14:50 shka_ please, don't be so down about state of the industry
21:15:44 francogrex good night
21:19:06 Fare make your own job, pick your programming language
21:19:31 jmercouris Fare: oh, that sounds easy :P
21:19:35 Josh_2 ^^
21:19:51 jmercouris speaking of jobs... I'm still looking for contributors: https://github.com/neXT-Browser/nEXT/
21:20:02 jmercouris I can't pay you, but we can work on something interesting together :D
21:20:38 Shinmera I think you'll find that most people already have their own versions of interesting things to work on.
21:20:55 Josh_2 No harm in asking though.
21:21:11 Shinmera Sure. I just wouldn't expect anything.
21:21:44 prxq jmercouris: money on the table always attracts collaborators :-)
21:22:24 jmercouris prxq: I'm working on it...
21:22:42 jmercouris I am hoping that eventually I can pay people to work on it, its' a hard model to start with nothing from open source though
21:22:43 Josh_2 About tree fiddy
21:23:19 jmercouris Shinmera: My expectations are below the floor :D
21:23:43 Shinmera They must be ground breaking, then.
21:24:32 jmercouris Lol :D!!!
21:25:04 pjb jmercouris: in the spirit of the above mentionned project choice problematic, it should be noted that you won't be able to compete with Firefox… therefore your project of a web-browser is ultimately doomed. But don't let that discourage you.
21:25:24 prxq pjb: :-)
21:25:30 Josh_2 pjb: just throwing a wrench in the works
21:25:48 prxq "you are doomed. Don't let that discourage you". That's... stuff for a bumper sticker
21:25:54 pjb :-/
21:26:21 pjb I mean, the doom is only on one plan. On multiple other plans, it can be a big success.
21:26:25 Shinmera Well, everyone's gonna die anyway, yet people still do things.
21:26:52 basket jmercouris: Prefer docstrings to comments
21:31:07 aeth jmercouris: I've given some thought about this for other projects. If you are going to have a budget to pay people bounties for things that compete with C++ programs, you probably should actually pay SBCL developers, rather than program developers. i.e. Get optimizations added to SBCL that make your code run faster.
21:31:45 aeth Although, of course, optimizations are on both sides, the application and the compiler, so they'd probably also make some changes to the application.
21:32:30 aeth There's probably a lot of low hanging optimization fruit in SBCL and CCL that GCC and LLVM implemented a long time ago.
21:32:54 prxq aeth: I'm not that sure.
21:33:16 prxq But still a good idea to get those missing in...
21:33:29 Shinmera I thought his browser used EQL and thus ECL anyway, so SBCL would be rather irrelevant to his own needs.
21:33:53 aeth Well, ECL then.
21:34:35 aeth And there's definitely stuff in ECL that could be improved. It's slower than SBCL and CCL in general (although not on all things), at least in my benchmarks.
21:35:13 Bicyclidine hello sbcl develoeprs, i have a hankering for all those sweet "fun"safe math optimizations, and
21:35:56 prxq a hankering? What the hell is that?
21:35:57 jmercouris pjb: I'm not competing with firefox
21:36:13 pjb You're still writing a web browser..
21:36:17 Shinmera It's a browser, so yes you are, even if you don't want to be.
21:36:18 Bicyclidine a hankering
21:36:22 jmercouris pjb: That's where you are wrong
21:36:31 jmercouris you are assuming there is only one space for a web browsr on a user's computer
21:36:36 jmercouris you have different tools for different jobs
21:36:40 Bicyclidine i'm going to hanker the shit out of them
21:36:46 jmercouris firefox tries to be everything, and they are casually good at everything
21:36:47 Shinmera There pretty much is, though.
21:36:57 pjb I'm not assuming: I've got Firefox and Safari open all the time together…
21:37:02 jmercouris but you have to change your perspective
21:37:09 jmercouris this is not a competition with firefox, this is a different class of tool
21:37:12 pjb But what this shows, is that Apple cannot complete against Firefox!
21:37:15 jmercouris this is a productivity research tool, not a BROWSER
21:37:31 jmercouris so a user may happily install this, and use firefox for whatever other some such nonsense they use
21:37:42 jmercouris additionally, I'm not trying to gain market share on the level of firefox
21:37:43 pjb Even if it has some nice features in Safari, Firefox is still better or the only browser able to do the job.
21:37:56 jmercouris I'm just targeting a few hardcore people like emacs users, and maybe to get the sympathies of some lispers
21:38:08 prxq jmercouris: sounds interesting (i mean it)
21:38:20 Josh_2 pjb: Uncle Bob is quite the character
21:38:33 pjb Josh_2: well, any old programmer.
21:38:42 jmercouris aeth: I would, but actually my program uses ECL :P
21:38:51 aeth jmercouris: yes, s/SBCL/ECL/ then
21:39:19 jmercouris aeth: yeah, i've really thought about that, I've been applying for some grants, so we'll see
21:39:29 jmercouris I also have a monetization plan if you are interested in hearing about it
21:40:41 jmercouris prxq: thanks for your interest! You can support me if you want by starring the repository :D
21:42:04 jmercouris basket: what's your strategy for multiline docstrings? do you use a standardized format for your docstrings?
21:46:41 basket jmercouris: Strategy with regards to what? Don't indent lines that shouldn't be indented when you read it
21:48:49 basket jmercouris: I try to give a brief summary, then cover each argument, then return value, then examples, skipping any or all of those if I don't think writing it in prose explains it better than the name does
21:49:11 jmercouris basket: but do you have a standardized format you use for the args?
21:49:29 basket jmercouris: But in a lot of places you've already written documentation for functions and classes that you just stuck in a comment where it's awkward to get at from a listener
21:49:42 basket I'm not sure what you mean
21:50:53 pjb jmercouris: each programmer has his own standard :-)
21:51:17 Josh_2 pjb: I'm 36 minutes into that vid. Am just waiting for him to say "youngens suck".
21:57:14 jmercouris basket: I want to run ultimately through a documentation generator, thats why I was asking
21:57:43 jmercouris basket: like this: http://quickdocs.org/clod/api
21:58:56 francogrex jmercouris: your project is interesting. you just have to think to add something useful for the mass of end-users that others browsers don't have in order to get an edge..
22:02:41 Josh_2 pjb: I'm gonna sell my computer and become a hermit.
22:08:56 pjb Josh_2: or keep it, to use it like you used your first micro computer: to write little games and programs for yourself. In Common Lisp, it's fun.
22:09:13 pjb Josh_2: watch a few Alan Kays' videos too :-)
22:11:19 Josh_2 I've never had "my first microcomputer" I'm 21. I've seen some of the Alan Kay videos you have put in #clnoobs before
22:11:26 Josh_2 like Power of Simplicity
22:13:34 Josh_2 Not many over 2000
22:13:44 Denommus` ** NICK Denommus
22:20:10 sukaeto <pjb> [...] But most of our coworkers wouldn't be able to maintain [some Lisp thing].
22:20:17 sukaeto I suppose this heavily depends on where you work
22:20:57 sukaeto if I were hit by a bus tomorrow, I have at least two teammates who could pick up the Lisp thing I maintain right away
22:21:29 sukaeto and a third one who'd be willing to do so begrudgingly (though I think he'd grow to like the tooling a lot once he got used to it).
22:21:44 sukaeto and ultimately, I think anyone on the team would be able to work with it if they had to
22:23:20 pjb sukaeto: the point is that if you have a non-homogeneous team, you will have half of it staffed by newbies, so the other half won't be able to use advanced techniques in the code, if you want it to be maintainable by the newbies.
22:23:51 pjb sukaeto: of course, you can also build a team of experimented programmers. But the more experimented, the fewer of them they are, and the more expensive they are. Exponentially.
22:24:34 pjb It's not only the doom of CL, but of other languages such as Haskell, Coq, etc.
22:25:07 Josh_2 This makes me very glad I don't want to work as a programmer.
22:25:12 pjb It's very nice to be able to incorporate any mathematical notion in Haskell, but the problem is that your coworkers are not mathematicians: they won't understand the first word of your haskell program even if they're haskell programmers.
22:25:36 pjb Josh_2: well, you would have it worse if you're a programmer manager…
22:25:36 sukaeto I dunno, I think you (the general "you", not you specifically) have a mentorship problem if you can't get junior engineers up to speed with your code
22:26:02 Josh_2 pjb: can you elaborate?
22:26:02 pjb Josh_2: the question is whether you're a _professional_ programmer, or an amateur. As an amateur, programming is very fun and nice.
22:26:54 pjb sukaeto: how much time do you allocate to mentorship?
22:26:57 pjb :-)
22:26:59 sukaeto yeah, I was gonna say. Maintaining "shitty" (where "shitty" is in the eye of the beholder) code in a language you're not familiar with is sometimes part of the job. You do it because you're a pro
22:27:25 pjb And being a lisper helps to give your perspective to do this.
22:27:34 pjb But it may remove some motivation: you need more money! :-)
22:28:05 pjb bbl
22:28:52 sukaeto pjb: I don't really have a precise answer for that, sorry :-/
22:29:56 Josh_2 I'm off to sleep, I have Uni tomorrow. G'night all!
22:30:05 sukaeto my vague answer is "give them a spin up buddy for the first few weeks, and then have the senior engineers be 'available' here and there for code reviews/questions/etc"
22:31:31 sukaeto also, I shouldn't be so absolute: you could also have a problem with technical debt if you can't get junior engineers spun up
22:31:45 sukaeto or you could have problems that I'm not imaginative enough to enumerate :-)
22:42:06 Xach aha!
22:42:16 Xach sbcl seems to have corrected the destructuring-bind of nil!
22:42:42 Xach attila_lendvai: it affects some hu.dwimware!
22:42:53 Xach #<HU.DWIM.CL-SOURCE-FILE "hu.dwim.presentation" "source" "component" "widget" "google"> specifically
22:43:20 attila_lendvai Xach: thanks for the head's up!
22:44:15 attila_lendvai ACTION builds SBCL head
23:00:34 nydel i need to parse some csv files in order to combine data that has a common element in two documents. would anyone recommend an existing library to deal with reading and writing csv to lists?
23:00:53 aeth pjb: It's worse than that. Mathematicians don't understand other mathematicians unless they're in the same sub-sub-field.
23:00:59 aeth It's the least comprehensible discipline.
23:05:15 pillton Would a doctor in a general practice be able to work as a nuclear physician without training?
23:08:28 aeth I think the general issue is something along the lines of a PhD mathematician is less able to read papers from other PhD mathematicians in general than a PhD foo reading papers from other PhD foos.
23:10:05 pjb Yes, but the difference is that thanks to Turing Equivalence, we can "compile" advanced mathematical papers or programs, down to basic logical expressions that any programmer can "understand" and maintain. <-- !!!
23:10:30 pjb and this is what is expected of advanced programmers: to write the most basic programming.
23:11:48 aeth Except programs are more rigorous than most mathematical proofs because programs have to run while proofs just have to be understood by humans.
23:12:41 pjb aeth: you mean they don't use automatic proof assistants?
23:12:54 pjb I'd hope at least most young mathematicians do.
23:13:08 aeth I think most proofs are still not computer-assisted in any way, afaik.
23:23:29 jmercouris aeth: well, it depends, some proofs rely on computation to prove some thing, let's say proof by reduction
23:33:39 bigos what are the best jobs for former programmers? what you think about data entry?
23:49:57 attila_lendvai Xach: the dest-bind issue should be fixed
23:50:56 attila_lendvai ACTION has found another one
23:53:52 attila_lendvai ACTION thinks it's really fixed now
23:56:43 didi So I need to retrieve values from 2-tuples keys. There aren't many keys. First, I used a CONS key inside an EQUAL hash-table. Now I am still using CONS keys, but inside an ALIST, which is performing better than the hash-table. Any ideas on how to improve it? The 2-tuples have integers as elements, so key_i = (cons -42 7), for example. And the values are positive integers.
23:59:04 didi It's a pretty ugly function if anyone wants to stare at the abyss: https://paste.debian.net/hidden/964697ba
0:05:05 Bike variable names make this kind of impossible
0:05:23 Bike but, maybe keeping it sorted? i guess more helpful if you expect misses
0:05:24 pillton didi: What about hashing the two integer values in the key?
0:06:52 |3b| if you have a known small range for the 2 values, maybe combine them into 1 number (if less than ~1/2 of your fixnum size) or just make a 2d array (if in the tens to hundreds range)
0:07:11 didi pillton: I tried cantor pairing, but it is slower.
0:07:21 didi Bike: True. Sorry.
0:09:04 didi |3b|: Do you have a combination algorithm? Like I said to pillton, I tried canton pairing ( https://paste.debian.net/hidden/aabda13e ) but in my case, it was slower.
0:09:19 didi s/canton/cantor
0:09:42 Bike one number in low bits, other number in high bits?
0:09:50 didi Bike: Uh...
0:09:59 didi |3b|: I see now.
0:10:52 Bike going straight to the 19th century is pretty metal though
0:10:52 didi Thank you all.
0:11:21 didi Bike: Well, true. But I might try it for some batch computations.
0:20:52 Noobiee Hello, someone can help me call the shell using ECL?
0:24:14 jmercouris Noobiee: Yes
0:24:26 jmercouris Noobiee: What do you mean by call the shell? execute an external command?
0:24:58 |3b| didi: i meant like (dpb k1 (byte 32 32) k2) or whatever
0:25:29 |3b| with 32s adjusted for word size and required range
0:25:34 didi |3b|: Thank you.
0:25:37 jmercouris Noobiee: If that's what you mean, please see here: https://common-lisp.net/project/ecl/static/manual/rn01re65.html
0:25:41 |3b| (and probably with more thought to make sure signed #s work correctly)
0:26:10 didi Oh, right.
0:29:16 jmercouris how can I inspect a lisp function at run-time?
0:29:34 pillton What do you mean by inspect?
0:29:49 jmercouris pillton: I'm trying to understand what the function does, I believe its a macro that's expanded out
0:30:12 jmercouris pillton: like is there a way I can say something like "show source" for a given function?
0:30:22 pillton If you use Emacs you can press M-. on the operator.
0:30:25 Xach jmercouris: M-. is one way
0:30:46 jmercouris pillton: Xach: it says "no known definition"
0:30:56 pillton What is the operator?
0:31:05 jmercouris qrequire, it's part of EQL
0:31:34 pillton Have you loaded the system in to the current image?
0:31:49 jmercouris pillton: https://gitlab.com/eql/EQL5
0:31:53 jmercouris pillton: what does that mean?
0:32:25 pillton What does (apropos "qrequire") return?
0:33:33 jmercouris pillton: nil
0:33:55 pillton Does it print anything out?
0:34:32 jmercouris nothing, only says "No apropos matches for ‘qrequire’" in message buffer
0:35:46 pillton That is why M-. does not work because the currently running lisp does not contain the operator.
0:36:08 jmercouris pillton: Right, that makes sense, I'm running ECL, and this symbol is part of EQL
0:36:42 pillton It has been years since I used EQL. It might be easier to just grep for it in the EQL sources.
0:37:00 jmercouris I've been doing that, I can show the definition, it doesn't really make sense to me
0:37:09 pillton Sorry. It might be easier for me to tell you to just grep for it.
0:37:37 pillton Please do.
0:38:54 jmercouris pillton: in this file: https://gitlab.com/eql/EQL5/blob/master/src/ecl_fun.cpp look for this line: cl_object qrequire2(cl_object l_name, cl_object l_quiet) { /// qrequire
0:39:56 jmercouris ah shit, I just realized why this was breaking my code
0:40:11 jmercouris fileName.prepend("/usr/local/lib/"); // "local" might not be in library search path
0:40:17 jmercouris I've moved the libs to a diff path
0:55:00 Noobiee i will try jm
0:55:02 Noobiee i will try jmercouris*
0:55:37 jmercouris Noobiee: best of luck! let me know if you have any issues
1:05:51 Noobiee (setf pastas (ext:run-program "ls" '() :output :STREAM :error :OUTPUT))
1:05:53 Noobiee SOrry..
1:06:00 Noobiee mistake paste
1:06:05 Noobiee it worked jmercouris
1:41:24 jmercouris Noobiee: yay!
1:52:16 Noobiee :]
2:41:33 z3t0 what happens in a loop with two for variables
2:41:41 z3t0 does it increment them both at the same time
2:41:49 z3t0 or?
2:44:02 Bike it can increment them at the same time or sequentially, but it increments each once per iteration either way
2:44:49 z3t0 ah
2:44:51 z3t0 so just to make sure
2:45:16 z3t0 (loop for x from 1 to 10 for y from 1 to 10)) is like so...
2:45:21 z3t0 1, 1
2:45:23 z3t0 2, 1
2:45:25 z3t0 2, 2 etc?
2:45:41 Bike no.
2:45:59 Bike try (loop for from 1 to 3 for y from 1 to 3 collect (cons x y))
2:46:05 Bike you should get ((1 . 1) (2 . 2) (3 . 3))
2:46:17 z3t0 ah I see
2:46:50 z3t0 if say I needed it to be as I showed above, would i make two loops or is there a way for a single loop to achieve that
2:52:44 Zhivago Which part of Bike's example doesn't fit your requirement?
2:52:51 Bike two loops
2:53:18 Bike Zhivago: it sounds like they want all distinct pairs, rather than just the basic iteration
2:53:29 beach Good morning everyone!
2:53:32 Zhivago Ah, I see.
2:54:08 Zhivago You could use a single loop and decompose the iterator.
2:55:35 jmercouris beach: Guten morgen!
2:57:42 turkja Hey what do you think about AMOP (the book)? Is it still relevant for todays CLOS?
2:57:48 beach It is.
2:58:04 pillton It is a great book.
2:58:08 turkja it's kinda expensive, so i'm curious
2:58:35 beach turkja: Most implementations still support the protocols in that book.
2:58:40 turkja nice!
2:58:42 Bike the protocol described is the basis for the modern clos implementations, with minor modifications
2:59:43 beach turkja: If you only need the specification part, you could use this site: http://metamodular.com/CLOS-MOP/table-of-contents.html
3:00:23 turkja i'll check it out, thanks.. but i also want to read good book :)
3:00:31 beach Sure.
3:00:47 jmercouris turkja: ahve you seen the cl cookbook? has a great clos section
3:01:34 pillton turkja: It is worth reading AMOP to get a better understanding of CLOS' object, glue and syntax layers. I found this useful for implementing non CLOS problems.
3:02:15 pillton i.e. The design of CLOS is worth replicating for other problems.
3:02:51 turkja (searching for used copy... i'm so easy to convince..)
3:04:30 jmercouris turkja: I don't advocate piracy, but maybe there are copies online...
3:10:57 z3t0 can you guys suggest some cool flashy things to show to people to convince them of the lisp way haha
3:11:08 z3t0 I find that the concept of macros seems to go above the head of most people
3:11:27 beach z3t0: People usually do not want to be convinced, so you are wasting your time.
3:12:52 z3t0 okay but I'm at first year university
3:13:06 z3t0 Theres a bunch of people that want to learn programming and theyve never done it before
3:13:17 z3t0 It's easy for me to persuade them because they dont know anything else
3:13:25 beach Good luck then.
3:13:47 White_Flame without experience in programming, and hitting the shortcomings of various language designs, they have no context in which to evaluate the strengths of advanced topics like metaprogramming or why somebody would actually do that
3:14:02 White_Flame in the beginning, it's much more about the immediate tangibles that grabs people
3:14:19 White_Flame and most other languages have greenspun in a lot of the low-hanging fruit that Lisp used to uniquely offer
3:15:11 z3t0 I agree
3:15:29 z3t0 My only angle here is that it would be easy to get a bunch of people using lisp if they dont really know anything else
3:15:35 White_Flame sure
3:15:43 z3t0 even if they only use 10% of the features of the language, its something haha
3:18:14 shrdlu68 Shinmera: Hi, I'm seeing an off-by-one error in clss while using the :last-child pseudo-selector.
3:18:19 beach z3t0: Maybe the REPL could be somewhat convincing.
3:18:29 z3t0 but python also has a repl?
3:19:58 pillton A REPL that doesn't require evaluating reload(<module>) all of the time?
3:20:13 marvin2 z3t0 so what, if they don't know anything how would they know python has repl
3:22:27 z3t0_ to nest loops do I just use a do ( loop())
3:22:58 Bike yep
3:23:00 beach Or COLLECT (LOOP ...
3:23:00 White_Flame anywhere there is an evaluated form, you can use a form..
3:23:07 z3t0_ alright cool
3:23:18 z3t0_ loop is just very confusing for me haha
3:23:40 White_Flame (loop do (loop)) for O(n^2) infinite looping
3:25:41 z3t0_ isnt there some sort of failsafe against an infinite loop?
3:25:51 White_Flame not built-in
3:26:17 White_Flame if you recurse, you could use blowing the stack as an infinite loop trap
3:26:21 beach z3t0_: If there were, the language would not be Turing complete.
3:26:25 White_Flame or just have a max counter check somewhere
3:26:39 z3t0_ but wouldn't this be dangerous?
3:27:01 shrdlu68 An infinite loop is a perfectly thing.
3:27:02 White_Flame programming is dangerous. What if you program the wrong thing? What if you forget to check for an error? What if you accidentally have a bug?
3:27:27 beach White_Flame: Wow, that can happen??? :)
3:27:37 White_Flame not if you're good enough! ;)
3:27:44 z3t0_ haha
3:28:20 shrdlu68 *perfectly fine, I meant.
3:28:37 White_Flame but in any case, the REPL is a pretty well-known example of an infinite loop
3:37:11 jmercouris White_Flame: also, all games are infinite loops
3:38:12 beach And operating systems.
3:38:41 marvin2 if that was true you couldn't close any game without killing it
3:39:02 marvin2 which would be pretty rude
3:45:25 shrdlu68 Shinmera: This appears to fix it: http://paste.lisp.org/+7NL3
3:46:15 beach shrdlu68: You need to use slime-indentation to get LOOP clauses to be correctly indented.
3:50:19 shrdlu68 beach: I can't seem to find slime-indentation mode.
3:51:31 beach In your .emacs, when you set up SLIME, do this: (slime-setup '(slime-fancy slime-tramp slime-asdf slime-indentation))
3:51:52 beach I.e. include slime-indentation in your setup.
3:52:10 z3t0_ hmm okay I am kind of stuck on a wierd proble
3:52:14 z3t0_ problem
3:52:31 z3t0_ I need to loop for x from a to b by c
3:52:37 z3t0_ Except c depends on the value of x
3:53:13 z3t0_ That doesn't even make sense...
3:53:19 White_Flame (loop for x from a to b by (+ x 2) ...)
3:53:32 beach White_Flame: That won't work.
3:53:44 beach White_Flame: The BY form is evaluated once.
3:53:47 z3t0_ it's circular logic
3:53:47 White_Flame ah
3:53:58 beach (loop for x = a then (depend-on a c) until (= x b) do ...)
3:54:08 White_Flame or use one of the DO forms instead of loop
3:54:24 White_Flame do it a bit more manually because it's kind of manual with LOOP anyway
3:55:49 beach For example: (loop for x = 1 then (+ x x 1) until (> x 100) collect x)
3:55:49 z3t0_ ill try that hmm
3:56:08 z3t0_ I just realised that what i am trying to do is far too complicated and unnecessary
3:56:26 z3t0_ I'll just use a more approximate algorithm and add some redundancy to make up for the difference
3:57:24 shrdlu68 (loop for x = a then (+ x c)...
3:57:49 White_Flame if loops start getting funky with accumulation/exits/whatnot I often just pull up LABELS and do a recursive version
3:58:48 White_Flame LOOP _can_ do a ton of stuff, but that doesn't mean you always should wrangle it in there
4:00:17 shrdlu68 beach: The slime set-up worked, thanks.
4:01:00 beach Anytime!
4:05:14 z3t0_ okay so just to recap
4:05:41 z3t0_ how do i increase the variable of a for in a loop by something in a do
4:05:48 White_Flame make sure your electrolytics are in the right polarity when you recap..
4:05:50 White_Flame oh
4:05:53 z3t0_ haha
4:06:15 White_Flame (incf a) ?
4:06:26 White_Flame (incf a delta), too
4:06:42 z3t0_ would that stop the default adding 1?
4:06:49 White_Flame it's just a lexical variable, for all intents and purposes
4:06:57 White_Flame why would it?
4:07:05 turkja jmercouris: I believe... :) Sometimes i try find copies online and if the book is interesting, i get a physical copy. but i'm getting old... :D
4:07:06 beach z3t0_: If you want that, then use for x = ... then ...
4:07:09 z3t0_ how would I make it do that then
4:07:25 z3t0_ oh okay got it
4:07:45 White_Flame so, to first-cap, you want to normally increment XOR do a custom increment?
4:07:52 beach z3t0_: Or just use (loop with x = ... do (setf x ...))
4:08:21 z3t0_ so would that keep it looping?
4:08:29 z3t0_ AH okay nevermind
4:08:37 z3t0_ I think I'm starting to grasp how LOOP works haha
4:12:06 beach z3t0_: I suggest you read chapter 22 in PCL.
4:22:52 d4ryus1 ** NICK d4ryus
4:27:43 z3t0_ im doing loop for x=112 then()
4:27:58 z3t0_ but clearly this is wrong since it says then is an unknown keyword
4:29:14 beach z3t0_: You need to read a basic text on Common Lisp.
4:29:27 beach x=112 is a symbol.
4:30:19 beach z3t0_: In general, you need to respect the spacing rules (imposed by the standard or by style rules) of Common Lisp programs.
4:45:28 jmercouris turkja: even more reason to read on a kindle, you increase the font size :P
4:46:49 turkja haha
4:47:12 z3t0_ hmm okay I'm a bit confused
4:47:24 z3t0_ I have a debug after a let statement so I can see what all the new variables are
4:47:41 z3t0_ except the locals in the debugger only shows two of the variables, and I set optimize debug 3
4:48:49 White_Flame jmercouris: ctrl-scrollwheel normally zooms on the desktop, and pinch to zoom on mobile, so you don't need to go to such platforms just to zoom
4:49:09 Fare (declaim (optimize (debug 3) (speed 1) (safety 2)))
4:49:22 Fare or (declare ...)
4:49:40 White_Flame (declare (bugs 0))
4:53:45 z3t0_ that did the trick thanks
4:54:58 White_Flame glad to help ;)
5:50:59 vtomole clhs environment
5:50:59 specbot Couldn't find anything for environment.
5:51:44 beach clhs 3.2.1
5:51:59 beach vtomole: The top-level environment stuff is discussed there.
5:52:27 vtomole beach: Thanks
5:52:37 beach vtomole: The documentation on lexical environments is very skimpy, simply because the nature of those environments is not mandated by the standard.
5:54:24 beach vtomole: If you tell us what you want to know, we might be able to help.
5:55:48 vtomole I'm trying to get better at finidng answers on my own. I've been a programmer for more than a year now. I should be reaching that stage :)
5:56:13 beach Fair enough. Excellent idea, too.
5:58:01 Fare Hint: You never reach that stage.
5:58:11 Fare But you do get closer.
5:58:20 beach It's the search that counts.
6:31:10 shka_ look for cltl2
6:31:33 shka_ reading it is a must for any lisp programmer imho anyway
6:50:15 pankracy 22:12 < jackdaniel> pankracy: for fiveam you may use fixtures, but they are really no different from with-* macros
6:50:54 pankracy jackdaniel: ok, so what about code which should be run before the whole suite only once?
6:53:41 pankracy any examples?
6:55:32 jackdaniel no, I never had such need so didn't investigate. You may check out source code if there is something
7:00:27 Ven ** NICK Guest55182
8:26:07 Ven ** NICK Guest7163