A lot of things should play together. Some things I mentioned in this presentation: https://www.slideshare.net/vseloved/lisp-in-a-startup-the-good-the-bad-and-the-ugly/26 (starting from this slide) But the main thing you, personally, can do now is continue using the language, regardless of the fad and other obstacles, making the ecosystem better little by little each day. :)
I wrote about this a while ago on comp.lang.lisp and others chimed in. https://groups.google.com/forum/#!topic/comp.lang.lisp/oSslA8mJdho
Sorry for the google groups link - I wish there was a better archive of Usenet to use instead, but I haven't found one yet.
I think this implementation is too low-level. Here's how I would go about writing a CSV line parser using esrap:
A line is a sequence of fields or whitespace:
(defrule line (or fields whitespace))
A sequence of fields is a field and the next fields:
(defrule fields (and field (* next-field)) (:destructure (first rest) (cons first rest)))
A next field is a field following a comma:
(defrule next-field (and #\, field) (:function second))
A field is either a complex value or a simple value, surrounded by whitespace:
(defrule field (and whitespace (or complex-value simple-value) whitespace) (:function second))
Whitespace is spaces and tabs:
(defrule whitespace (* (or #\Space #\Tab)) (:constant nil))
A simple value is a sequence of simple characters:
(defrule simple-value (* simple-char) (:concat t))
A simple character is one that is not a comma, a quote, or whitespace:
(defun simple-char-p (char) (not (member char '(#\, #\' #\Space #\Tab))))
(defrule simple-char (simple-char-p character))
A complex value is a sequence of complex characters surrounded by quotes:
(defun concat-second (list) (concat (second list)))
(defrule complex-value (and #\' (* complex-char) #\') (:function concat-second))
A complex character is either a simple character, a comma, a space, a tab, or a quotes pair:
(defrule complex-char (or simple-char #\, #\Space #\Tab quotes-pair))
A quotes pair is a quote followed by a quote:
(defrule quotes-pair (and #\' #\') (:constant #\'))
Now we can parse a CSV line:
CSV> (parse 'line " hello , '''quick & dirty'', according to some' , world ") ("hello" "'quick & dirty', according to some" "world") NIL CSV>
1) Sbcl binaries via SourceForge are OK.
2) You can build it yourself from source if you want. It's not that hard. Install msys2, then install gcc via pacman, the package manager. Then build sbcl as described in docs, voila.
Taken from the FAQ: > Nyxt is web engine agnostic. We utilize a minimal API to interface to any web engine. This makes us flexible and resilient to changes in the web landscape. Currently, we support WebKit and WebEngine (Blink).
> Nyxt comes with a built-in ad blocker. Please see the built-in documentation of blocker-mode for more details.
I read through the whole book a few years ago and did nearly all the exercises. The last two are still on my TODO list as life happened and I just didn't have the time nor energy.
This book had an extreme, and I think good influence on me as a programmer. It's on top together with The Pragmatic Programmer and The Art of Unix Programming as the big trio that made me who I am today. While I don't use the concepts much in my everyday work, the way I think about problem solving in general has changed. You can find some of the concepts from the book in nearly every language out there, from JavaScript to C#, even in Golang. I'd even say most other programming languages are slowly becoming more Lisp-y. Have a look at Racket and How To Design Programs aswell.
It is really well documented. I used not to see the point of Garnet in the modern GUI age, but maybe it would work great with a OpenGL backend -- especially for targets like Android/iOS etc.
Yeah! From the campaign page:
>EDIT: > >If $16,000 is reached, the scope of the "big compiler lock" in SBCL will be curtailed, so that it will be possible to compile things in parallel. Should that goal not be reached, funds over $12k will be split between work leading towards it and general SBCL work.
Hi iwaka,
First of all, thanks for the kind words, it's always a pleasure to see so much enthusiasm for Nyxt :)
There might be a confusion with the version you are using. Can you verify that
you are running 2-pre-release-4? (Run nyxt --version
in the shell, or call the
nyxt-version
from Nyxt itself.)
If not, please update.
See our https://nyxt.atlas.engineer/download page for more details.
The right margin on GitHub only displays the latest stable release (here 1.5.0, which turns out to be way less stable than the current pre-release, so I highly encourage everyone to update). However you'll see the pre-release as well if you go to the release page.
While there is a lot of room for improvement in our documentation, I'm surprised
that you find there is "very little" of it. See the tutorial
and manual
command, they should cover most parts of the browser.
Then all classes, most slots, most commands, functions and variables have
docstrings which can be consulted from Nyxt itself using the describe-*
commands.
Our tutorial is a bit rough at the moment, but the good news is that we are working on an interactive tutorial that starts easy first and only later goes into the advanced topics, as you suggested.
About the final 2.0 release: minimum a few more months, sorry :) So I suggest you try out the latest pre-release since it's much, much better than 1.5.
The essential points that must be addressed for 2.0:
Cheers!
It's not an answer to your question, but I would recommend to take a look (if you haven't already) at the Julia Language. It is not a Lisp, but it's parser is implemented in Lisp (femtolisp) and it is homonoical, which makes metaprogramming almost as easy as in most other Lisps. It is certainly influenced by Lisps, but I am missing s-expressions a little bit (you can use them, but it is too verbose to be used in regular coded except in macros). But if you are from a python background, the syntax will look familiar to you. And even though it is intended to be a general-purpuse programming language, Julias's main purpose is high-performance numerical work. The community is very active and there are libraries for most numerical needs (including machine learning). You can easily execute fortran and C code from julia and python modules can be also called with the PyCall module. However, Julia is still very young and still has a many rough corners. New libraries are appearing all the time, but it is still little to what you have available in python for example.
Well, if you want a "real" Lisp for number-crunching I would use Common Lisp. I recently got into data analysis in particle physics and I was surprised when I learned that "The Higgs Boson Machine Learning Challenge" was won by a program written in Common Lisp and this challenge was 2014.
In terms of structuring your program, one common approach is to separate the data model and how you present it (presentation layer). Try reading up those process information files under /proc and map each one properties into a class, struct, alist, plist etc. and then define a few operations around them (signals, kill etc.). Collect them together in a list/array/hash-table. After you have that, think about how the task manager should look – print to standard output, or as a graphical list, perhaps, using one of the Lisp GUI libraries.
Personally, I like to break projects up into reasonably completable steps that can provide instant gratification via the REPL, otherwise I'll get bored and move onto new shiny thing, hence the bottom-up approach.
Here's some docs on /proc, btw https://www.kernel.org/doc/html/latest/filesystems/proc.html
Alas, I did no Lisp in 2010. The closest I got to Lisp was sending some guy $30 to support Quicklisp (oh, wait, that's you! ;), and getting Let Over Lambda for Christmas. Hopefully 2011 will be better, Lisp-wise.
Humorous aside: What is it with the Lisp-y "LOL" acronyms? There's Lisp On Lines, Let Over Lambda, and Land Of Lisp. W. T. F? Makes it hard to abbreviate any of them unambiguously. Maybe subscripts? LOL(1), LOL(2), and LOL(3)? Shortening instead of abbreviating? LOLines, LOLambda, LOLisp? (But really, it's not a big deal. :)
> hints for someone who is really comfortable using Jetbrains IDEs and finds emacs a bit too much of a barrier to overcome??)
yes :) https://lispcookbook.github.io/cl-cookbook/editor-support.html Atom + SLIMA is very good and getting close to Slime. VSCode has two new-ish extensions. There's an Eclipse plugin, but it's basic. Also try doom-emacs and enable its CL layer (https://github.com/hlissner/doom-emacs/).
> down in popularity and attention from the programmer's community
it's going back up today :) [1]
[1] it's true, but saying it out loud also helps make it true.
To me, Vladimir Sedach, ended the debate on if macros are needed quite a while ago:
> The entire point of programming is automation. The question that immediately comes to mind after you learn this fact is - why not program a computer to program itself? Macros are a simple mechanism for generating code, in other words, automating programming. Unless your system includes a better mechanism for automating programming (so far, I have not seen any such mechanisms), not having macros means that you basically don't understand why you are writing code.
Not as part of this campaign, but!
Thanks to hard work by Anton Kovalenko and Dmitry Kalyanov a Windows fork exists that already supports threads on Windows. https://github.com/akovalenko/sbcl-win32-threads/wiki Anton at least is available for hire if you wish to support his work.
David Lichteblau is in the process of merging their code to mainline. He is available for consulting through his employer: I understand that he is doing the merging work on their time, so any money thrown that way helps prioritize things.
He is unhappy because I've deleted two of his messages (not to me).
The first: 'It's a pointless conversation. You aren't going to see the other side, and I'm too old, too tired, and too busy to argue with know-it-all 25-year-olds.'
The second: 'Surely you jest, kid.'
Then:
> I'm sure this comment doesn't carry any weight, and will get deleted by the almighty "lispm": with > this level of ability to apply logic you have no business being in business. Please PM me your info so I make sure to never hire you in the future. > E: lispm who clearly has a chip on his/hers shoulders: https://news.ycombinator.com/threads?id=lispm and who obviously works for LispWorks. > What's your agenda, son? > I'm going back to work on my boat and to enjoy my retirement — you go fight your inexistent fights.
I've asked him to stay friendly and polite. Response:
> '"Polite and friendly" isn't the same as "someone who agrees with me and the product I'm peddling", hon.'
'aol-zombie' is an account active for one day.
Personally I have enough of trolls, spammers, ... and I prefer not to see this turned into another comp.lang.lisp .
I posted the "Uncompromising Metaprogramming" link the other day mostly because it reminded me that macros are compile-time programs that operate on your source code. Therefore, they make a good tool to enforce stablity, correctness and security constraints on your code.
I feel like I don't see people talk about this much. Or you hear about it and then there aren't really any examples. I wrote a with-locked-open-file macro atop POSIX lockf for Paktahn but that's a pretty straightforward and weak application in my mind. But it turns out lockf doesn't actually give you any guarantees.
Anyway, folks will be whining about ML/Hindley-Milner/SystemF based languages vs untyped Lisps on the internet forever. Clearly many of us happily choose Lisp including many folks like pkhuong and others who are well exposed to ML-family languages and exceptionally gifted systems programmers. Presumably there is a good reason.
I would be very interested in seeing someone who can show me when and how to best leverage deftype, assert, macros, CLOS, etc to generate safe code and enforce the kind of constraints that ML+Scala+Haskell folks like to brag about. If you didn't take it too far and try to write an emulation layer for a statically typed functional language but instead took the most sensible advantage of CL's built in facilities in this area I bet it'd be quite a thing to see.
An Introduction to Typeful Lisp. It's just a thought. :)
Common Lisp would be a good choice if low latency isn't very important for your trading strategy. There's even a book (https://www.amazon.com/Professional-Automated-Trading-Theory-Practice/dp/1118129857) that considers such a trading system. Though, be ready to meet real difficulties when you discover a lack of important pieces in CL library (FIX engine, proper data structures to implement order books, etc, etc, etc)
For
is a special case of tail call iteration. Some things are clumsy to express in a for loop but are easy to express with tail recursion. I find tail recursion so useful that I implemented a special form which creates recursion points in Emacs Lisp, exactly because it was hard to write certain kinds of iteration with a loop macro. Grep around the code base to find example usage.
Easiest way:
(ql:quickload "quicklisp-slime-helper")
This will give you a line to add to your .emacs file.
So in Emacs C-x C-f (Hold control, hit x, release x, hit f, release f, release control) "~/.emacs"
copy and paste the line quicklisp gave you.
C-x C-s to save your file. Close emacs, reopen emacs.
M-x (Hold alt, hit x) type slime, hit enter.
Ta-Da!
> floats were renamed as reals because a type's name should reflect it's meaning, rather than it's implementation
.... except that if a value something of type 'real' is nevertheless an IEEE754 'float' underneath, then those values are not going to behave like mathematical reals. (Cf. e.g. Perl6, where Rat and Num 'do' the Real role.)
Are you developing on Mac OS? I'm just curious because the bundled version of Emacs is the very vanilla command line version. There are much better options:
Aquamacs is great for people unfamiliar with Emacs as it adds a lot more functionality to provide a version of Emacs that behaves like a standard Mac Application.
(If you aren't using OS X, then ignore this, it was the use of Clozure CL that made me curious.)
My answer will be off-topic, since it won't be about Lisp itself. But I think applications written in Lisp, such as Emacs or StumpWM, can contribute directly to the popularity of the language. Maybe I can reformulate this point in order to be a little bit more close to the topic - and as a beginner I might very well be wrong: I think Lisp, as a language, tend to produce pieces of software that can make Lisp immediately useful and attractive, and maybe a bit fascinating.
I will quote Richard Stallman:
> The special properties of Lisp, which make extensibility possible, are a key feature, even though many of the users will not be programmers. Lisp has escaped from the ivory tower forever, and is a force to be reckoned with as a system programming language.
(https://www.gnu.org/software/emacs/emacs-paper.html#TOC28)
I will talk about my personal experience here. I began to learn Emacs in 2009, learned to hack a little bit of Emacs Lisp, got used to the syntax. I was viewing Lisp like a non-programmer tool, I could manipulate a piece of software that was useful in my everyday life with it. Soon I wanted to do more, I needed to manipulate other things, system-wide. I remember my very first need was to rename files based on their EXIF data. I was already familiar with Emacs Lisp, so I decided to learn Common Lisp. I loved the idea of interacting with the Lisp process using the REPL. But the real next step for me was StumpWM: it was like Emacs, but with Common Lisp. The Lisp process became even more fundamental to me since it was the center of my entire desktop experience. Today I want LispKit to be my everyday browser very bad and I learned about Mezzanine (the LispOS) with very much excitement :)
Why the downvotes?
I'm genuinely curious here; having given the source code a cursory read-through, I can't see anything eye-stabbingly wrong. Did I miss something?
Spent a while on Project Euler, doing 51 problems in CL and building up a decent chunk of utility functions in the process.
I started and am closing to releasing my wrapper for fann
Also beginner here:
While "Practical Common Lisp" is a great resource to learn on (and free), I had a lot more fun with Land of Lisp. I found it a lot more beginner friendly than any other book out there and with some great examples inside. It's not free, but it's popular enough that you're school's library might have a copy.
There are some, not unreasonable persons, who don't consider scheme to be part of the Lisp familt. See this post by Kent Pitman
Disclaimer: I consider scheme and racket part of lisp
Or it may be because the author does not consider Racket a Scheme?
Also, there's this:
I set alerts for my area, and I don't see that many, but there have been 2 in the last week or so.
If you can pinch a copy of OpenGenera from somewhere cough here, you can look in SYS.SCT for source code.
Haven't tried doing anything with CL specifically, but I have a Raspberry Pi 400 and it works pretty well for basically everything except browsing. I mean, browsing's fine, but that's the area where the ARM SoC starts to show it's a lower-spec device. The Pi 400 has 4GB of RAM and four cores at something like 1.8GHz, so most normal development stuff likeusing emacs, compiling OCaml code, running interpreted languages, and so on is just fine with it. No problems with video, I can run Xorg locally plus also have a second one running for remote desktop use, and more without any issues at all.
But browsers just suck the performance out of everything. To be fair, browsing's still mostly fine too; it's just where the limitations really stand out. Basically everything else is fine.
That said, that's the Pi 400, which uses a slightly newer chipset than the 4B, so it's clocked slightly higher out of the box (1.8GHz vs 1.5GHz, respectively). Also supposed to be easier to overclock due to most of its internal space being taken up by a massive heatsink, whereas with the 4B you have to consider cooling if you want to avoid throttling for sustained use at max speed. Though the Pi 4B can have twice as much RAM if you buy the 8GB model, so there's that in favour of the 4B.
Also, if you use one alongside your macbook, you can install barrier on both and use one keyboard/mouse between both devices. Give the Pi its own display and just swap back and forth seamlessly, making the macbook do all the browser stuff.
Anyway, TL;DR: yes, you could absolutely use it for what you want. It's a pretty snappy little computer that only really seems to bog down with browsing, because browsers suck.
Other things from the side bar:
> Other Lisp related subreddits: r/scheme, r/clojure, r/racket
No explicit mention of /r/common_lisp (does that even exist?). The only reason to not explicitely mention the elephant in the room is if the room was intended to house the elephant, while the linked "others" have their own ones.
> Useful Lisp resources:
> Planet Lisp
> Quicklisp
> LispForum
> Cliki
> Common Lisp Directory
> Common-Lisp.net
> Common Lisp Hyperspec
> comp.lang.lisp
> Common Lisp Professionals Mailing List
All common lisp links. No Scheme links, No Racket links, No Clojure links.
> Free Lisp Books
> Practical Common Lisp
> On Lisp
> Common Lisp: A Gentle Introduction to Symbolic Computation
> Common Lisp The Language (Pre ANSI Lisp)
> Structure and Interpretation of Computer Programs (Scheme)
So basically the side bar is chock full of CL stuff, and besides SICP mentions the other dialects only as "other subreddits". If you ask me, this very certainly implies an intended focus on CL.
I would read the code snippets of ANSI Common Lisp and On Lisp by Paul Graham. Assuming you have read at least the first book (which I find one of the best language "references" together with K&R The C Programming Language)
For game developing Clojure + libGDX maybe a good choice.
AFAIK the game "Bounce Away" was developed with these tools.
I tested with my old Android Tablet and it seems to have a reasonable startup time.
https://play.google.com/store/apps/details?id=com.friendlyvillagers.ballz&hl=en
Um, range + map + filter.
EDIT: Or, for efficiency
(defun filt-map (f guard seq &optional (output nil)) (if (not seq) (reverse output) (let ((item (car seq)) (rest (cdr seq))) (if (funcall guard item) (filt-map f guard rest (cons (funcall f item) output)) (filt-map f guard rest output)))))
I was inspired by this:
(defun my-rename-symbol-at-point () (interactive) (let* ((curword (thing-at-point 'symbol)) (to-word nil)) (if (null curword) (message "No symbol at point!") (progn (setq to-word (read-string (concat "Replace " curword " with: "))) (save-excursion (goto-char (point-min)) (replace-regexp re-curword to-word))))))
FYI, you can have several lisps configured at once. "M-x slime" runs the first. "M-- M-x slime" gives you a prompt to select which to use.
Here's an example slime config
First of all, "Lisp-based CAS not Maxima" is a pretty small set. https://www.cliki.net/Mathematics includes Axiom but that is about it.
Second, it is not clear to me that "lexical scoping" or even Lisp is a clear win in a CAS. The OP is fixated on a particular use of anonymous functions which seems unrelated to typical CAS applications. Most math notations use other techniques for defining or processing anonymous functions (e.g., refer to arguments by numeric position) and treat functions-taking-functions differently from ordinary functions whose domains are numeric. The problems of programming in a CAS are quite different from Lisp.
Third, I'm pretty sure the OP is not asking in good faith. If you look at his history, he has apparently been iterating through environments like SciPy, Mathematica, complains vigorously about any issues he encounters, then rejects any help. Let him give up on Maxima and CL and go bother some other community.
I do not know what server you are using (assuming apache2 below), what specifically your hosting permits you to do, or the security implications of what I'm doing:
# Enable the cgi module on apache2, if not enabled already sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/
Add the following to your /etc/apache2/apache2.conf
(on Ubuntu 18.04):
<Directory "/var/www/html"> # or wherever you want to put the files AllowOverride None AddHandler cgi-script .lisp # might as well compile and use .fasl files from SBCL or anything suitable Options +ExecCGI Require all granted </Directory>
Restart apache2: sudo systemctl restart apache2
.
Use the appropriate shebang lines (#!/usr/bin/sbcl --script
) and mark the relevant files as executables.
> crystalline pyramid of comprehensible mutually-interlocking concepts
Uh, does he think he is talking about Symbolics Genera here? There's no crystalline pyramid. Genera is a ball of mud. Often amazing mud (see Kent Pitman on Tags Multiple Query Replace From Buffer) but nothing crystalline.
It's completely bogus to call this a Lisp OS.
It is, at best, a Lisp assember along with enough LAP code to create a 16-bit bootloader, using BIOS calls to emit some output.
And the new "Ink" dialect of Lisp looks like vaporware.
> the project is only at very very initial stage, with an assembler written in Common Lisp, and a 16 bit bootloader. Currently I can only describe it as a toy.
There is XWayland which could be used to run X programs on Wayland for some time, but in the long term a Wayland backend would probably be ideal. (Based on what happened last time Wayland was hyped, moving to Wayland is also very long term...)
LXC are Linux Containers. Basically, "VMs" that don't emulate the hardware. In technical details, it's chroot on steroids, because processes and networking are separated from the host.
You might have heard of docker. Docker is based on linux containers.
This technology is getting a lot of traction since ~2 years, because it allows people to create isolated environments very quickly, very cheaply. Fedora 21, for example, will have each application run in a different container (iirc). Deploying containers on AWS lets you build multi-tier architectures for cheap, etc etc. Many applications.
I personally use them as VMs for my projects (each project gets a VM). And lxc-wrapper is there to help me with that. I think this is a common usage though, so I thought it was worth sharing.
> Your university or public library's Inter-Library Loan department may be able to borrow a copy from another library for you.
According to WorldCat the only library in the US that reports having a copy is Stanford. The are three libraries in Germany that also have it.
>Can I take advantage of my programming skills to help myself learn mathematics more thoroughly and have more facility in performing calculations and writing proofs?
Study Maxima's source code perhaps.
If by any chance you use a Mac, do yourself a favor and go grab Aquamacs. You can use it on a Mac with all of your normal shortcut keys (Command-S to save, etc) right out the gate, and just learn the other stuff as necessary.
Plus it comes with a bunch of extra bells and whistles already installed/enabled. Which actually annoys me at times because I prefer some alternatives (such as html-mode vs. html-helper-mode), but oh well. :)
The Boost C++ library has a fairly succinct description of "variants".
> Whereas standard containers such as std::vector may be thought of as "multi-value, single type," variant is "multi-type, single value."
http://www.boost.org/doc/libs/1_55_0/doc/html/variant.html
The concept has been around for a long time, but different communities use different terminology for it. In OMG IDL, this construct is known as a "discriminated union". In XSD, it is called a "choice element".
Hi, idk what he means but I can tell you what I understand by it from stuff that has been discussed here before, like ProjecturED.
In the common case programming revolves about one writing a text file feeding it to a compiler that transforms that text file into an internal representation it can understand (an AST) and then manipulating it to optimize it and generate machine code. Now lets say I want to modify function foo. I modify the text file and the compiler ignores all the previous work it did before and recompiles the file from scratch.
What would be a better way? Storing code in the representation the compiler understands/manipulates and presenting it as text as a side-effect. From what I understand that is how Smalltalk works (but I am not even a Smalltalk newbie so take my word with a pinch of salt).
CL images, can also be thought as another way to store code other than text files.
The benefits can be plentiful, for example refactoring & other static analysis tools either have to work with the compiler/runtime of the language (like slime's edit-defintion and xref does afaik) or duplicate a lot of the work of the compiler, like Eclipse or sourcegraph
my understanding is PD is a piece of free software attempting to improve upon/replicate much of core ideas in max/msp and it is written by the same developer. max/msp being a popular paid utility has quite a bit more $$ behind it, and as such offers a much more polished user experience. In terms of technical differences - I am sure google will help you here and I believe they do exist. I assume there were technical nitpicks that the developer was able to incorporate into his own project that learned from/didnt get incorporated into max.
PD is here: http://puredata.info/
and max/msp is here: http://cycling74.com/
I have spent my share of hours with both programs and think its all a bunch of excellent software. I dont regret at all shelling out for max/msp.
There is also jitter to go along with max/msp, which allows for a matrix data type to be added to the dataflow graphs. Jitter is great for real time (or not) video processing. Ive used it to make a reverse music video (procedurally generated music from video) - which was super fun, if a little crappy ;)
I am the author of LLA — I found this thread because /u/vityok opened a ticket. LLA is currently semi-abandonware: I fix bugs, but don't plan to do anything more substantial. The reason is that I no longer use CL for this purpose, I switched to Julia.
Before writing LLA, I thought that the only obstacle is the lack of a library, but then I arrived at the conclusion that CL is not especially suitable for matrix manipulation/linear algebra. People try from time to time, since CL is such a great language and it would be so nice to use it for everything, but in the end almost all efforts are single-maintainer and eventually abandonned.
If you want to use matrices, vectors and linear algebra, but at the same time get some of the elegance of CL, I would recommend that you look at Julia. The language is still in flux, but has multiple dispatch, macros, and a lot of features inspired by/similar to CL.
I think the most successful Lisp-shell hybrid so far might be Emacs's eshell. You are limited to redirecting text, but you can redirect directly into Emacs buffers or other virtual devices, such as the clipboard.
Translated. Every member of the list is equal to the first. Use every or <strong>cl-every</strong> and a function that tests whether something is equal to the first member.
[spoiler](/s "(defun constant-list-p (l) (every #'(lambda (x (equal (car l) x)) l))")
edit: sorry not recursion or do loop.
Still a student so my year was mostly learning:
Spring semester took a class with Prof Gerry Sussman on symbolic programming. I'm still chewing on the things he taught.
Paradigms of AI Programming: worked up to the Prolog compiler chapter. Got overwhelmed, will resume it later.
Land of Lisp: worked through most of the book, extending systems and rewriting them as I saw fit. Most fun was in the wumpus game... I totally rewrote it, added support for colors and shapes, incremental production of the game graph.
Right now I'm actually learning Erlang, but I hope to be proficient in it to start hacking on Lisp Flavored Erlang (https://github.com/rvirding/lfe).
Practical Common Lisp is great for.. well, Common Lisp :-)
For Scheme/Racket you might want to check out Structure and Interpretation of Computer Programs which targets Scheme: http://mitpress.mit.edu/sicp/full-text/book/book.html
You may find that idiomatic 'common lisp style' is different from 'scheme style'.
It's taken a while, but this is gradually being developed for more specific uses, for example the latest version is in this android app: https://play.google.com/store/apps/details?id=foam.uavtoolkit&hl=en
Upvotes!
Also, given that Clojure has become a recognizable and fresh name, and is making the jump to target JavaScript, it might be interesting to migrate to use Clojure syntax, or provide a Clojure compatibility module.
A bit of trivia:
> (You'll note that the x3j13 cleanup proposal that gave you the fact > that *READTABLE* is bound by LOAD and COMPILE-FILE is called IN-SYNTAX. > This might give you a clue about what I originally had asked the > committee for and what they bargained me down to. Sigh...)
-- Kent Pitman [quote from c.l.l], [the cleanup issue]
> Describing a mutable system as an immutable system is a lie.
A lie suggests an intent to deceive. I really don't think that's the case here.
You might say it's incorrect, but in trying to have a conversation with someone, it's better to try and find out the way that they are correct, and assume they meant that. Otherwise you're just being an asshole.
In this case, K supports global variables and mutating (amending) values, same as Lisp. Most programmers don't recommend this type of programming in K or Lisp, so it is useful to think of K and Lisp as similar in this way. If you know Lisp, you will find it easy to learn K because in this way they are similar.
This is in contrast to languages which encourage object-oriented programming in the Simula/Java/C++ sense of the term, where objects represent crude non-concurrent actors. (Which, of course, can also be simulated in Lisp and K, if you're thinking about capabilities, but as these aren't the first tool used by experienced Lisp programmers, you won't find "private variables" or "classes" very accessible in K either).
I think it might be an issue with the Windows 10 shell. It works fine for me in Mac OS X (El Capitan), Windows 8.1 (VM), and Ubuntu 16.04 (VM). I think you should post a bug report/query on the SBCL site. You can mail them to their bugs list here - https://lists.sourceforge.net/lists/listinfo/sbcl-bugs.
Unfortunately, I don't have a Windows 10 VM to try it out for myself and see. Can you possibly try out another shell like ConEmu (Console Emulator 2 - https://sourceforge.net/projects/conemu/) and let us know?
UPDATE: I have x-posted your query on /r/Common_Lisp. Hopefully someone might have faced the same issue, and might have a quick and simple solution! Good luck with your Common Lisp journey! :-)
Thank you. But would Ltk get slower if the program grows larger?
I have considered McCLIM but the examples seem somewhat "less fashion". Have you used GTK and/or IUP, what do you think of them?
I wouls like the GUI for the RSS reader to be something like https://www.vienna-rss.com/
I've dabbled with lisp for years, but what really got me into it was arc: https://sites.google.com/site/arclanguagewiki. There's something about writing programs with the source code of the compiler open in another window (it fits in a single file) that is hard to beat.
Over time as I ran up against arc's limitations I ended up hacking more on Racket and gradually picking it up. But arc was the gateway drug.
>Or should I write the common lisp package as a cli software, compile it and then do a "shell call" in the software?
This is definitely the simplest/easiest. Check out start-process-shell-command
In a recent interview he gave, the author of LoL explained that if it was his decision, the book would have gone even much faster and focused even more on advanced parts because that is where he thinks Lisp has an advantage over other languages. But he then was forced by his publisher to make more and more introductory chapters and to explain more and more details making the book bigger and bigger. His intent never was to write an introductory level textbook, it often just looks like one, maybe because of the comics.
Land Of Lisp also has its own Google Goup.
You can also ask on the Lisp Forum.
If you solve some problem and think that it should have been better explained in the book, please write it up and post it so other people can benefit from your effort.
>I've seen a lot of concurrent software in Java, can't be that difficult.
I've seen operating systems written in assembly too, what's your point exactly?
>On a very small scale.
I did not realize stackoverflow was the definitive metric for Clojure jobs, thanks for clearing that up for me. Oddly enough, indeed.com has a slightly different result.
> LGPL is most probably just like any other "free" license.
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/bsdl-gpl/index.html
All-n-all, I'm just glad to see something like Clasp to come into existence, licensing (and reddit's collective butthurt) concerns aside.
Baggers maybe you would like to try Synergy useful it allows you to share your keyboard, mouse and clipboard between computers, even with different OSs, I used it in the past (when it was free) and it worked ok, it is not expensive but is closed source. There are some alternatives but I cannot recommend them because I never used them.
Edit: Correcting a typo.
I am an electronics engineer, the concepts as I see them in these links are similar to analog computers, where you basically use Operational Amplifiers to process inputs and feed them to other parts of the circuit. I did find this idea interesting to write somthing like SunVox (a music software) or the node editor in Blender, It seems to me that all you need is a data structure that is linked to to some inputs and outputs, and a function that could be passed to it when defined, and have it updated each time any of the inputs changes, then you just have to connect ones with others. You could achieve this with cells probably since it will give you the modify when cells are updated type of behavior you are looking for. Having said that, I would do something with the spirit of arrows but very lispy, Haskell is very strict.
I would certainly try to use a Scheme to work through SICP, it expects some features like tail-call optimisation Common Lisp doesn't guarantee. Maybe installing Racket is the easiest solution, since it has a decent IDE which isn't hard to learn, and I think there is an SICP compatibility mode.
This looks like it would be right up my alley. I've used LambdaNative to build a simple Linux desktop app, but I'd like to really give it a test drive by creating a cross-platform game that could run on Android.
The problem is I'm leaving the country the morning after submissions are due, and I'll be gone for three weeks, so I could submit a game, but I won't have access to the internet during the voting period. I've never participated in a game jam before. Would not participating in voting be a huge breach of etiquette?
No doubt trying out the games and voting is a huge part of the experience. I would still plan to try out all the games and offer feedback once I got back even though I missed out on the voting window. Or would it be better for me to sit this one out and shoot for the one next year?
It's not an easy operating system, but it does have a nice editor built in! Paredit or the like is essential.
If I want a single (, or {. or [. or ", I have to backspace over the automagically inserted close. :)
Even more fun is that I use Spacemacs, so don't even ask about keystrokes!
I have never tried those things, but LOCAL-TIME and PERIODS are a good mix.
http://cliki.net/time has more of the time stuff.
PERIODS is here https://github.com/jwiegley/periods
Generally, local-time is recommended for time stuff; it's up there with alexandria and babel as "stuff that everyone uses to augment the standard".
D'oh yeah! I started writing my first Lisp interpreter! N.B. the most useful version is a few commits back. I stopped in the middle of a medium sized refactoring :-|
SBCL is already emitting pretty efficient code, as long as it has enough contextual information to do so. Instead of writing a full post to explain how it works, I'll point you to a blog post I wrote on this topic some time ago: https://write.as/loke/common-lisp-code-optimisation
The short summary is that in C you may write the following:
int foo(int a, int b) { return a + b; }
Note how the above code tells the compiler a lot of information that allows it to map the C code to very optimal machine code.
In Lisp, you typically don't tell the compiler what the types of the arguments and return values are, so the emitted code needs to check the types at runtime. But, if you actually provide this information, the Lisp compiler can emit just as efficient code as the C compiler.
One reason to learn Scheme if you haven't programmed before is if you're using the beginner's academic textbook How to Design Programs, or MIT's The Structure and Interpretation of Computer Programs, which is the famous textbook that was used for MIT's 6.001 course from 1985 until 2008.
The skill of programming carries easily across languages. Once you know how to do it, learning any other language is a matter of reading a one-page tutorial to learn the syntax, and using the language's API reference to see how to use the language's standard library.
One of the advantages of learning Lisp is that it is based on just a few simple constructs, and everything else in the language follows logically from that. In other programming languages, there are obscure exceptions to every rule in the language, so sometimes your code looks right but isn't, which is frustrating even to a professional programmer, let alone a beginner.
> Interesting. I'd never heard it explained that way before.
It was mentioned in The Practice of Programming by Kernighan and Pike, a very influential book:
> As personal choice, we tend not to use debuggers beyond getting a stack trace or the value of a variable or two.
> ...
> Blind probing with a debugger is not likely to be productive. It is more helpful to use the debugger to discover the state of the program when it fails, then think about how the failure could have happened.
There is a whole chapter about debugging in it, quite insightful.
In my opinion, you should learn both because there are absolutely wonderful books that use these languages extensively. For example,
How to Design Programs (htdp.org), Structure and Interpretation of Computer Programs, Essentials of Programming Languages, Programming Languages Application and Interpretation require Scheme while Paradigms of Artificial Intelligence Programming, Winston's AI and Lisp, Building Problem Solvers, On Lisp require Common Lisp.
I've been using Scheme for around 3 years now, and Common Lisp for around a year and a half and I haven't had a problem "context switching". Both languages are really wonderful, and I don't think it'd be fair to pick just one :).
> Others may be a bit wary of a community that put the GPL on their shallow derivative of a sizeable non-GPL project
Parts of SBCL are licensed under Public Domain, MIT license, and BSD license, with some parts under copyrights of Xerox, Symbolics, and Gerd Moellmann (and I believe most if not all of these are inherited from CMU CL) [1].
Not a single mention of GPL are found within its license and copyright summary file [1].
Debian project also came to the same conclusion [2].
Sources:
I think a direct implementation of delimited continuations as an extension to some of the CL compilers would be the solution for this.
https://sourceforge.net/p/sbcl/mailman/message/32755039/
[1] Kiselyov, O. (2012): Delimited Control in OCaml, Abstractly and Concretely
[2] Gasbichler, M. and Sperber, M. (2002): Final Shift for Call/cc: Direct Implementation of Shift and Reset
[3] Flatt, M., Gang, Y., Findler, R. and Felleisen, M. (2007): Adding Delimited and Composable Control to a Production Programming Environment
But I'm not up to the task.
The book Object-Oriented Programming: The CLOS Perspective contains several papers that compare CLOS with object systems of other languages, including Smalltalk. The book contains references to Self, but no direct comparison IIRC.
There's also a system called sheeple that you might find interesting.
Another option in this vein is to use orgmode in emacs with babel. It allows you to include code, run the code, generate code blocks and the output. It has support for LaTeX as well. I like the fact that you can use multiple languages in the same document if you want to show comparisons, or it just simpler for what you want to do. If you end up using emacs and slime as your ide it is convenient to use the same set up for writing your document and including code snippets.
Again, see the post by Kent Pitman:
https://groups.google.com/forum/#!msg/comp.lang.lisp/Bj8Hx6mZEYI/6AWmNEwQR5YJ
In the same thread there is also a good post by Erik Naggum, which I agree to, surprisingly. ;-)
Scheme and Lisp are now two different communities with different goals, no compatibility, (almost) no shared code, different user groups, different communication channels, ...
That Scheme started as an improved Lisp is now long ago... Same for any other language which forked from Lisp: ML (the original ML was a language for a theorem prover, written in Lisp), Logo, Dylan, Clojure, ... They have now they own language families and communities.
Like Kent Pitman says, if we want to reach out, then suddenly Javascript and R are also Lisp dialects. But for practical purposes this is completely irrelevant.
I use Arch for the last 3 years. The advantage of arch is the package system (Pacman) and AUR (Arch User repository).
Packages are pretty up to date and cutting edge. When a new release of EMACS comes out, it is updated almost immediately usually within a day. SBCL is only one month/version behind. ECL, Clisp and CMUCL are also a packages. CCL is in AUR and is also up-to-date. ABCL is also in AUR. StumpWM is in AUR. Even things under development are in AUR like the NEXT browser and CLasp. It also looks like all the principal scheme implementations are in packages except Gerbil and Chez are in AUR.
The Antiweb codebase makes fairly heavy use of them to define automatically escaping strings for use with HTML generation.
What issues does CLSQL have in SLIME? I haven't noticed anything other than having to evaluate (enable-sql-reader-syntax)
at the beginning of my session.
https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992
^Work through this book, and you’ll learn by doing. Check out Dr.Racket, if you need an IDE. Chez is also another
^ this book is wonderful, but recommend doing it after the little schemer book.
Best to read Practical Common Lisp and then PAIP. https://www.amazon.co.uk/Paradigms-Artificial-Intelligence-Programming-Studies/dp/1558601910 Ref1 is a good guide.
Okay, I just finished chapter 1 (first draft) last night and updated the LFE mail list with the progress: * https://groups.google.com/forum/#!topic/lisp-flavoured-erlang/Px1Tsngj9G0
More to come!
Racket used to be called PLT Scheme and was an implementation of Scheme. But they decided to diverge from being “Just a Scheme” and to be its own language. They renamed it to Racket at that point. See https://racket-lang.org/new-name.html for more details.
Brew install clojure, it's as easy as that.
https://clojure.org/guides/getting_started
The more popular a language is, the more support it has. Clojure is the most used lisp as far as i know. So if you want something lisp like it's a strong contender.
Come join us on the community as slack channel.
The tone is not good regardless of where in the ecosystem you invested time, simply because it's very easy to take it as an attack. I even agree with the sentiment, it's not as easy to get into the whole ecosystem, it's not as easy to find the "right" libraries, it's not as easy as https://golang.org/ 's Playground (I actually find the https://www.python.org/ experience equally frustrating without prior knowledge).
That said, it's not like there's hundreds (tens?) of volunteers available to make it smoother, so while complaining is ... well, it is, it only highlights the pain points for those able and willing to work on it.
> It shouldn't be this hard
And with that attitude I have zero interest in doing something about it either.
I learned the word "Speicherverwaltung" (memory management) from CLISP, so I'd hate to see that go. :)
On the CLISP topic, some 11 years ago I wrote a GNU Make include file for building CLISP linking sets, replacing the clumsy script for doing so.
Mailing list post:
https://sourceforge.net/p/clisp/mailman/message/13173700/
Unfortunately that post doesn't have the code, only an example usage (setting up some variables in your own makefile, and then including that file).
The script actions are replaced by rules, and without any of the crazy symlinks being involved.
I will see if I can find the code somewhere ...
... and here it is now:
The parentheses are due to paredit-mode
. You can M-x paredit-mode
to temporally enable/disable them. For persistent change add the following to the init-file $PORTACLE_HOME/user.el.
(remove-hook 'slime-repl-mode-hook 'enable-paredit-mode) ; Disable paredit-mode for the REPL (remove-hook 'lisp-mode-hook 'enable-paredit-mode) ; Disable paredit-mode for lisp files
For "simple" parentheses (paredit enables what is known as structural-editing - it's powerful once you know it; admittedly, it does have a learning curve), you can (add-hook 'slime-repl-mode-hook 'electric-pair-mode)
.
The suggestions are due to company-mode
. You can M-x company-mode
to enable/disable them. But I didn't find the equivalent of above to be working for it.
If you wish to avoid emacs at this point of time, and have some time to set up an implementation and a few other things, you can try Atom's SLIMA.
I think best might be to delete the package itself from the atom's packages, besides updating the sidebar ofc. I don't think github is the first place for checking out packages for newcomers. Other than that, I think people will keep trying atom-slime until slima gains more popularity - there are enough posts on the internet (a quick google search) pointing to atom-slime in recent years; so it'll be a few years until slima's posts overtake them. atom-slime is still about 10 times more popular than slima, going by the numbers!. I guess we'd need help from sjlevine himself.
https://groups.google.com/forum/#!topic/comp.lang.lisp/Bj8Hx6mZEYI%5B1-25-false%5D
[edit] Just noticed that that thread was started by Ron Garret. Is it me or did he start a lot of the flamewars on c.l.l?
oh, thanks I didn't know that! I guess this is a good reference?
https://dev.to/ericnograles/why-is-docker-on-macos-so-much-worse-than-linux-flh
I will test the Nyxt container a little more, but until know it didn't seem significantly slower than the Linux .deb file I use.
In emacs type C-h i
to start Info, and then m Emacs Lisp Intro RET
to get to some nice built-in documentation that will quickly get you up to speed -- or if you prefer the web, go here.
hth
I hear what you are saying and generally speaking I fully agree.
However, this project started out because I wanted a Lisp based toy to learn Lisp and try out things, including breaking things on purpose, such as: see, this program works with dynamic scope and breaks with lexical scope. The interpreter has a boatload of commandline options to remove features such as "--no-labels" that will allow you to strip down the language feature by feature to pretty much untyped lambda calculus with dynamic or lexical environment. It's fun to multiply two numbers when you neither have a multiply operator nor numbers, and you have to program both by yourself.
That said, I guess your point is still valid. Every commandline switch except --dyn and --lex will have immediate results that won't be missed. --dyn and --lex can produce wrong results which could missed, all the other switches may at the worst produce an error message and halt the program which won't be missed.
I guess I'll remove the commandline switch and either add it to the language or introdice some kind of file-variables (I think Emacs' elisp does something like that, apparently for choosing dynamic/ lexical as well) or some kind of interpreter directive that must be inside the source file and affects the current source file only.
And should I ever release this interpreter to the public (or at least to persons other than me) then I will add a big disclaimer regarding commandline argument usage.
Actually interpreter directives or file-variables seem useful, unless someone is able to remember the combination of commandline switches that are needed to run a program that they wrote 2 years ago. Thanks for the idea!