|
Pick SICP and switch to HtDP if you feel out of your depth. Chapter 4 is where the fun starts.
|
# ? Dec 12, 2012 12:56 |
|
|
# ? Jun 2, 2024 01:07 |
|
Any advice for graphics/game dev in Lisp? I'm most comfortable in Scheme, Clojure, and Racket, but if there's any canonical choice here I'd be willing to look into it. I've done a bit of graphics in Racket, but I think the docs are less helpful than they could be.
|
# ? Dec 16, 2012 08:03 |
|
theratking posted:Any advice for graphics/game dev in Lisp? Well see http://lispgames.org/index.php/CommonLisp.
|
# ? Dec 16, 2012 13:28 |
|
I'll heed the warning. Any particular reason why it's such a bad idea or is it just history? I wonder how simple it would be to interlace Clojure and Java for a graphics project.
|
# ? Dec 18, 2012 04:47 |
|
theratking posted:I'll heed the warning. Any particular reason why it's such a bad idea or is it just history?
|
# ? Dec 18, 2012 04:53 |
|
There's no reason not to use CL for games. As you mentioned, there are a lot of Python games, but Java is also quite common for web games where Flash is too slow to handle it graphically. Unfortunately, the CL community doesn't have much of a focus on real-time graphics or gaming, so the library selection is relatively small. You should still be able to find enough to bootstrap from.
|
# ? Dec 18, 2012 08:15 |
|
"There aren't any good libs" is not a good enough reason to justify not pursuing something. I'm stitching together a 2D rpg from racket/base and it's coming along just fine. It's not slow or cumbersome, it's just tedious. I plan on developing a library to help me finish the game and hopefully I'll get that done and open source it, etc. CL would be a better choice for game development, but quicklisp can be painful, and racket's PLT is much simpler. Racket beats python on the benchmarks by a long shot, so there's really no worries. CL can compete with C++ in the right hands, so keep that in mind. Don't quit just because a goon told you no or you can't find any good libraries, please. Cumulative Self-lulz Caused: Bans: 0 | Probations: 6 Days 6 hours 15 min | Lang: Racket, Ruby | Public Projects: (none so far) |
|
# ? Dec 27, 2012 00:17 |
|
luxxx posted:CL can compete with C++ in the right hands, so keep that in mind. In performance? No. What's with your sig anyway?
|
# ? Dec 27, 2012 00:56 |
|
luxxx posted:[...] CL would be a better choice for game development, but quicklisp can be painful, and racket's PLT is much simpler. [...]
|
# ? Dec 27, 2012 01:01 |
|
It wasn't anything too critical, it was mostly presentation and installation pains. A few packages had been broken by what I assume was QL updates, and would not install, and were still on the list of QL packages. A package manager should be maintained to a certain degree imo, and sometimes quicklisp is hard to even install. I was using CrunchBang 10 when I first came across it and I had monumental difficulties with it, and that was before I could even use it! I really like PLT because it's designed to be simple and quick, and it is. The sacrifice is that fewer people use it, but that's fine with me. #racket is usually somewhat busy, so I'll survive. Cumulative Self-lulz Caused: Bans: 0 | Probations: 6 Days 6 hours 15 min | Lang: Racket, Ruby | Public Projects: (none so far) |
|
# ? Dec 27, 2012 02:23 |
|
theratking posted:I wonder how simple it would be to interlace Clojure and Java for a graphics project. OK so I'm just kinda talking out of my rear end here but here are some thoughts. The biggest obstacle, so I've read anyway, to doing interactive graphics on the JVM is garbage collection. Even though you may be able to push plenty of frames per second on average, if the garbage collector intersperses 100ms pauses here and there, your game is going to be a lovely experience for the user. I know there have been new collectors introduced that are supposed to limit the duration of stop-the-world pauses, but in general the solution is to shun the generic heap allocation facilities and do up-front allocation with object pools, etc to avoid GC altogether as much as possible. This approach is incompatible with idiomatic Clojure, which tends to generate lots of immutable objects on the heap. As a possible solution, consider adopting a Quake-like networked game architecture from the start. So you have a relatively dumb client that does some interpolation/prediction and renders the game based on gamestate snapshots from the server. As long as the client and server are in separate processes, the server can have its random pauses and the gameplay should continue unhindered. The client and server can share Java code to do things like collision detection queries, etc, but on the server side you can implement the high-level game logic, AI, and other thinky bits in Clojure. You'd also be able to do most of the fun dynamic language crap like manipulate your game world from the REPL, swap in new behaviors on the fly, and so forth. Please note that I have implemented none of this and even my basic premises may be incorrect but I'm posting anyway.
|
# ? Dec 27, 2012 06:19 |
|
shrughes posted:In performance? No. Yes it can. And this is from experience. You will be hard-pressed to find microbenchmarks that give CL the edge though. afaik only the defstruct object creation in Lisp is faster than C++'s. It's more down to the programmer seeing the forest through the trees than the performance of any smaller constituent part. Tiptoeing around the GC and programming in C++ style will make you wish for C++ though.
|
# ? Jan 10, 2013 14:33 |
|
I've been scripting FDTD simulations using Guile lately, and I'd like to ask, what's the deal with (set-port-line!)? Is it supposed to return anything? (port-line) seems to respond to it, but when I invoke (read) or (read-line) after invoking it, both these commands read from the beginning of the file, no matter what I set the port line to. Even stranger is that the return from (port-line) still increments upward by one no matter where (read) or (read-line) actually read from. What gives?
|
# ? Feb 16, 2013 18:02 |
|
Perhaps it depends on the kind of port used? If your port is over a stream or string, it would make sense that you cannot arbitrarily change line or column. Nevertheless, such silent failing behaviour is quite the coding horror.
|
# ? Feb 20, 2013 18:02 |
|
I've been gradually introducing myself to Lisp languages, and as a consequence of my desire to learn things the "right way" I've read quite a bit about the various introductory books, texts, and online resources about Lisp. There has been 50 years for people to write bad books about Lisp, and after a lot of reading I believe I've pretty comprehensibly covered all the main approaches to learning Lisp (or Scheme). I hope to contribute this to the OP. SICP or Structure and Intepretation of Programming Languages http://mitpress.mit.edu/sicp/ quote:SICP is not really a scheme book per se. It is more a 'learn what programming is actually about' (not to be confused with teach-yourself-to-program-in-3-hours books), which happens to use (a subset of) scheme. It is also quite likely the best introduction to computation book every written. On the other hand, it moves too quickly for many true neophytes. Regardless of the introductory nature, most professional programmers with years of experience will probably find things of value in the pages and exercises.... http://eli.thegreenplace.net/category/programming/lisp/sicp/ This programmer kindly documented his efforts to work through SICP over a ten month period, with explanations accompanying his code examples. He covers 94% of all the homework in the book. How to Design Programs http://htdp.org/2003-09-26/ Read this second edition below http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html This can been seen as an alternative to SICP. HtDP was also published by the MIT Press, and I've read an essay by the authors that it was written to help correct some of the weaknesses that SICP has. As a backup to SICP How to Design Programs is perhaps the best recommendation. Free online Practical Common LISP http://www.gigamonkeys.com/book/ Many people talk about how Practical Common LISP taught them how to get things done using LISP. It discusses LISP rather than Scheme. Of the non MIT Press books freely available online it's the best introduction to getting things done in LISP. Land of Lisp http://landoflisp.com/ http://lisperati.com/ This books is one of the most often recommended to people interested in learning Lisp because of the gentle tone taken with the material. Many lessons are punctuated and summarized with cartoons that talk about the powers of the Lisp family of languages. Despite the childish cartoons the book is an excellent introduction to Lisp that covers much of the same material as SICP. The Little Schemer http://vivid.chengyichao.info http://www.ccs.neu.edu/home/matthias/BTLS/ This is the weirdest book of the bunch. Not really a textbook, not really a lesson on how to learn Lisp, the book is about how to learn to think recursively. It tries (very well) to help the reader to grok reading recursively in Lisp from inside to outside. The book has a question and answer format, where each page is divided into two column. There has been an online implementation of the book at the vivid.chengichao link above that gives a good idea of what the book is about. There is an earlier version called the Little Lisper which is superseded by this version, and at least one sequel that covers more advanced topics. For most programmers interested in Lisp, this version should be sufficient.
|
# ? Feb 25, 2013 04:06 |
|
Next people may be interested in what the differences are between Scheme and Lisp. The OP covers it pretty well but this is a more detailed list. http://c2.com/cgi/wiki?LispSchemeDifferences Varieties of LISP http://www.sbcl.org/ Steel Bank Common Lisp: One of the most common Lisp languages today it has it's reputation from being an "industrial strength" language. Varieties of Scheme http://www.call-cc.org/ Chicken: A variety of Scheme that compiles to C code. It has excellent support for plucking out any C library that you can think of and integrating it into your code. Yes, I'll say it again, you can use C libraries with this Scheme. Racket: This is the updated version of Scheme that you will find in SICP and other older texts that use Scheme. It can be directly substituted with the material in SICP. It isn't that popular nowadays because it diverged too much from the previous "Revised(5) Report on the Algorithmic Language Scheme" that many other types of the Scheme language still use today.
|
# ? Feb 25, 2013 04:17 |
|
Good post. To add to that: Varieties of LISP If you work at a company and want really good support: - Allegro CL - LispWorks (good multiprocessing/concurrency libraries, fast compiler) If you want the fastest available CL compiler: - SBCL If you don't care about performance, but want to use CL anywhere as a scripting language: - CLISP If you want to use CL for more bare metal work: - Embeddable CL If you want a CL specialised for windows applications: - Corman CL Notable mention: multiplatform, with good OSX support, not as fast as sbcl, but more stable - Clozure Varieties of Scheme You really have a hardon for GNU/Linux and swoon at watching Stallman pick is feet during a lecture: - Guile A Scheme going closer to C/C++/C# or even compiling into it - Bigloo Using Scheme for the web: - Hop Beef fucked around with this message at 10:43 on Feb 26, 2013 |
# ? Feb 26, 2013 10:39 |
|
I know I've mentioned this dialect in this thread before, but Lisp Flavored Erlang just got itself a new website: http://lfe.github.com/ It's a lisp-2 that aims to maintain full compatibility with Erlang as a language, but does give you the macro power and whatnot that lisps usually get. code:
code:
code:
code:
I'm having a bit of fun with it so far.
|
# ? Feb 26, 2013 15:10 |
|
We're doing a tech refresh and rewrite of one of our big products at work and I'm pitching the idea of using Clojure for it. I have enthusiasm from some sectors (rational, well rounded developers) and opposition from others (ultra conservation crusty old enterprise guys). I fortunately have some time to play so I'm going to write a prototype of the corest of core functionality and see how it goes. Wish me luck!
|
# ? Feb 27, 2013 02:40 |
|
AmericanBarbarian posted:The Little Schemer The man who wrote this book is my current professor. We are currently converting Scheme code into C code. poo poo is awful. I know how this sort of stuff would be practical for companies like Cisco to not have to have programmers extremely proficient in C right off the bat, but god drat this is some banal stuff. E: For some more advanced readings from the same author, I would recommend picking up his Essentials of Programming Languages , it really is a great way to teach formulaic programming. InflateableFerret fucked around with this message at 04:13 on Mar 6, 2013 |
# ? Mar 6, 2013 04:07 |
|
InflateableFerret posted:The man who wrote this book is my current professor. We are currently converting Scheme code into C code. poo poo is awful. I know how this sort of stuff would be practical for companies like Cisco to not have to have programmers extremely proficient in C right off the bat, but god drat this is some banal stuff. You should also read The Reasoned Schemer.
|
# ? Mar 6, 2013 14:54 |
|
trex eaterofcadrs posted:You should also read The Reasoned Schemer. They get to that later in the class, and they use a much better version of the book than what's published. The Scheme-to-C stuff is probably the weirdest stuff in the class, but you do learn some interesting things from it.
|
# ? Mar 6, 2013 16:01 |
|
InflateableFerret posted:E: For some more advanced readings from the same author, I would recommend picking up his Essentials of Programming Languages , it really is a great way to teach formulaic programming.
|
# ? Mar 6, 2013 17:36 |
|
MononcQc posted:I know I've mentioned this dialect in this thread before, but Lisp Flavored Erlang just got itself a new website: http://lfe.github.com/ I've always wanted to give erlang a try, and I think this is exactly the motivation I needed, thanks!
|
# ? Mar 7, 2013 07:51 |
|
mnd posted:Formulaic programming? Can you elaborate? A set system of translating LISP or other functional languages into tail-recursive, argument-free, functions. You can then use functional languages to handle nasty recursive problems while still using another language for your overall program. It's a very formulaic approach.
|
# ? Mar 29, 2013 16:10 |
|
Welp, I decided to migrate our current Parse backend to Clojure + Postgres on AWS. Pretty retarded for a guy who doesn't really know Clojure or has written REST-style apis himself, especially with a live product, but I like a challenge. I have a year or so of experience with Rails though, so it's coming in handy, except this time I am both Rails and its user One of the biggest challenges with Parse is that you don't have any logic on the server, so you need to do everything client-side, which in my experience completely demolishes Mobile Safari on an iPad, especially for an analytics product like mine. There's CloudCode, but it's pretty miserable to work with as opposed to doing it in the browser (debugging, access to all your favorite libraries, using require.js etc). In a couple of days I put together a small web api that takes/returns JSON for one simple model and controller and got a few dozens unit tests peppering it. Basically replicated the same routes Rails exposes. Extending that to all of the models I have in Parse is just pure grunt work of API implementation and conversion from the NoSQL schema to SQL (we're not really leveraging any hardcore NoSQL features anyway, so it's easy). Also got migration working through ruby's standalone_migrations, which supposedly is one of the best libraries out there for the task, and justifies not doing it in Clojure. Some things I think are going to be actually hard:
Any thoughts? Suggestions for the above? Experiences you can share? DreadCthulhu fucked around with this message at 23:29 on May 2, 2013 |
# ? May 2, 2013 23:17 |
|
DreadCthulhu posted:
For what it's wroth, heroku has built-in support for clojure
|
# ? May 9, 2013 01:05 |
|
Pardot posted:For what it's wroth, heroku has built-in support for clojure True that! I actually ended up braving setting up my own box in EC2, saved the AMI, configured nginx to forward port 80 (eventually 443) to Jetty on that same machine. Still haven't dealt with a lot of the deployment automation (seems like puppet is the way to go, but I might be able to ghetto through it with straight bash) and configuration management of the various environments (e.g. prod vs staging). It's somewhat rough at first, but a pretty worthwhile learning experience. On the Clojure front I was able to put together one simple Postgres-backed model (don't know what I'd do without Korma) with a Compojure-based controller. Testing everything with the standard test suite at this point, although considering either speclj or Midje sooner or later. Also, authentication was super simple thanks to lib-noir and the session/cookie middleware included by default in Ring. I'm basically re-doing all of the critical parts of Rails, minus the stuff nobody needs. The fact that it's just a JSON api rather than something that might have to serve web pages / do templating really helps simplicity-wise. Was basing most of the initial prototype off of Paul Umbers' https://github.com/3rddog/doitnow , but now I'm more comfortable with the language that I can start to improvise. Also, discovering vim-fireplace and vim-paredit was really helpful, can't go back anymore. As a side-note, I'm blown away by how generous the community has been in putting together quality tools that make everybody's life painless. tpope with his vim tools, technomancy with lein, raynes and yogthos supporting the best parts of noir after it's been deprecated and generating a ton of available sample code on github for reference.. very commendable in my eyes. DreadCthulhu fucked around with this message at 01:33 on May 9, 2013 |
# ? May 9, 2013 01:29 |
|
I know there are several projects that'll make it possible to use Lisp to develop for iOS and Android. However I don't know anything about their viability. Has anyone here recently used Lisp to develop for the mentioned platforms? I currently do not care whether it is CL, Scheme, Clojure or another member of the family, but I do prefer the solution to be able to target both iOS and Android.
|
# ? Jun 19, 2013 14:44 |
|
From what I know, there are two main implementations in the works: http://wukix.com/mocl , which implements (an incomplete) CL from scratch and LispWorks, which is working on iOS and Android support for their complete CL implementation. I hear it's a pain just to make the implementation go through Apple's verification. If it's for professional work, I would take one of the crappy existing solutions and then jump on either of the above when they get an official release. Beef fucked around with this message at 12:16 on Jun 20, 2013 |
# ? Jun 19, 2013 15:01 |
|
Beef posted:LispWorks, which is working on iOS and Android support for their complete CL implementation. No poo poo? I wasn't aware of that, awesome. I'm going to check it out. edit: Googling didn't turn up much, have you got a specific link for me? aerique fucked around with this message at 15:59 on Jun 19, 2013 |
# ? Jun 19, 2013 15:55 |
|
Tempting!: https://docs.google.com/document/d/13kocjneV_tprPBXm6q63QQnCqmofRMBCJ8qjzHmxvgk/pub Scheme scripting in Unity. I've got to check this out tonight.
|
# ? Jun 20, 2013 08:47 |
|
The lispworks iOS thing is hearsay from a Lisp symposium, so not really public yet. Knowing them, you will probably pay a license for each development platform
|
# ? Jun 20, 2013 12:16 |
|
mocl, a Common Lisp for on iOS and Android, has been released. It's no open source but $199 for a personal license I can live with. When the announcement of its imminent release came I was afraid it would be something like $1500 for a license. Still, I might still be going with haXe instead of mocl, since the former comes with so many extras that I'd have to code or bridge to when using mocl. haXe also allows me to prototype on whatever OS I like and doesn't come with any licensing hassles. I'll email the Wukix guys about things that are still unclear to me (like what's the deal with upgrades and is the license tied to a single OS).
|
# ? Jun 24, 2013 08:08 |
|
Anybody else excited about the new Joy of Clojure coming out soon? I've been perusing the MEAP edition available here and it seems better than the first book. Not much on Clojure 1.5 out there yet, seems like most of the books are stuck on 1.2 - 1.3. Also the O'Reilly Clojure Cookbook is looking pretty good, although I have no idea what the timeline on that is looking like.
|
# ? Jul 12, 2013 23:20 |
|
DreadCthulhu posted:Anybody else excited about the new Joy of Clojure coming out soon? I've had Clojure on my list of programming languages to check out for quite a while now. Was the old version of the book any good? Fogus is a frequent and good poster on HN so if that is any indication I might just get the new version and bite the bullet.
|
# ? Jul 15, 2013 08:55 |
|
I would not get the old version simply because it's for Clojure 1.2 and there have been a lot of tweaks made on the periphery of the language (not necessarily big ones to the core) that imho make a Clojure 1.5+ book much more relevant. That and I think Fogus got extra experience writing books since the first Joy and his Functional Javascript, making the new one tigher than the first edition.
|
# ? Jul 16, 2013 19:29 |
|
On an unrelated note, a talk about Friend, our very own authentication/authorization module. I rolled my own a while ago, but thinking of switching to this at some point.
|
# ? Jul 16, 2013 19:30 |
|
There's also Hy, which is a Lisp implementation for Python (https://github.com/hylang/hy) that currently is pretty barebones and shouldn't be used in production. However, it is rather neat toy to play around with and experiment. Code gets translated automatically into Python bytecode on the fly and it's extremely easy to call Python code from Hy and Hy code from Python. I have been playing with Hy for a week or so and found it a lot easier to get started than Clojure.
|
# ? Jul 22, 2013 06:18 |
|
|
# ? Jun 2, 2024 01:07 |
|
negationix posted:There's also Hy, which is a Lisp implementation for Python I've used haXe for a couple of small projects and it is pretty bearable to work with and I was pretty surprised by the Flash API. I had expected some kind of monstrosity but it was nice.
|
# ? Jul 22, 2013 12:00 |