freenode/#lisp - IRC Chatlog
Search
15:09:33
russellw
The construct for implementation-specific code e.g. #+SBCL, what is that called so I can look up the documentation?
15:13:45
phoe
so it doesn't matter if the symbol pushed into *features* is :foo, bar:foo, baz::foo or #:foo
15:14:36
jackdaniel
that does not mean, that if you look for phoe:foo it will look in keyword package
15:15:13
jackdaniel
if you type #+flat-namespace , it will look in features for keyword:flat-namespace
15:15:26
jackdaniel
if you type #+cffi:flat-namespace, it will look in features for cffi:flat-namespace
15:16:29
jdz
Right, the correct wording is: «While reading the test, the current package is the KEYWORD package.»
15:50:43
oni-on-ion
i also notice, that when slime is running, emacs will highlight the code i've changed. i've been disabling that as it gets a bit laggy the more of these highlighted regions there are, but i've just read in this article here that one can send all of those edited lines into slime. anyone know how off hand?
15:52:41
trittweiler
Once upon a time, I was thinking of writing a small TAILCALL that would expand to the right declarations depending on the implementation (and otherwise cause compilation to fail.) Not sure if (locally (declare ..magic..) (funcall ...)) is enough on all implementation; an implementation may need optimization settings at the start of the body of the function.
15:53:09
trittweiler
oni-on-ion, it's the slime-highlighting-edits contrib. Just remove that from your (slime-setup '(...)) list
15:54:11
trittweiler
it would be nice to see if it can be sped up or where the bottleneck is, if you have the time anyway.
15:55:01
oni-on-ion
trittweiler: i will start using it now, because i find it useful if even there is no way to "eval all highlighted edits into slime connection"
15:57:00
oni-on-ion
ah, i guess it is official, just need to do C-c C-c : https://common-lisp.net/project/slime/doc/html/Highlight-Edits.html
15:57:48
oni-on-ion
i just read the whole elisp code for it, nothing seems obviously computationally demanding, i can only guess that multiple background faces make emacs slow on my system. will keep mind open on that
16:01:55
AeroNotix
I'm not sure I understand why TCO was left up to the implementation. Relying on TCO makes your code non-portable. At the time of standardization was TCO rare/difficult/something else?
16:03:04
oni-on-ion
would it affect some code to rely on TCO optimization? would that really change semantics etc?
16:03:26
oni-on-ion
that is also what i am thinking and just why i asked, AeroNotix , maybe TCO was undeveloped at the time
16:07:46
oni-on-ion
heh, from a-road-to-common-lisp: "You don’t have to track down the bug from just a stack trace, like a detective trying to piece together what happened by the blood stains on the wall. You can examine the crime as it’s happening and intervene to save the victim."
16:57:37
jasom
oni-on-ion: also, dynamic bindings can make things that look like tail-calls not actually tail calls
17:04:20
oni-on-ion
im not smart enough to imagine any but i wont make the assumption that such code is possible/exists/isbenefitial
17:05:16
oni-on-ion
yes. well im trying to figure out if TCO affects the actual execution/result of code with and without it
17:05:24
AeroNotix
The link I provided before suggests that most major/non-meme CL implementations have TCO. I wonder how SBCL deals with a (funcall dynamically-bound-function) in the tail call position
17:06:08
Bike
(defun factorial (n &optional (acc 1)) (if (zerop n) acc (factorial (1- n) (* n acc))))
17:06:49
oni-on-ion
ahhh. forgot about stack things. just read that the stack frame is gone before the call rather than after, when TCO is happening
17:07:55
Bike
if you're just talking about whether implementations CAN do TCO, there's nothing preventing it, and like aeronotix said it's pretty common
17:10:39
AeroNotix
Bike: the issue for me is that, yeah, CL has other looping constructs but if an implementation/most implementations implement TCO then what's the point if it's not a portable construct?
17:12:52
Bike
what i mean is if you treat it as an optimization it's not necessary for it to be portable
17:13:11
|3b|
well, arrays larger than 2^24 elements aren't portable either, but they are pretty useful too :)
17:13:49
AeroNotix
Bike: eh, I can agree with that but it still would make me uncomfortable about using it.
17:19:13
|3b|
ACTION has hit the "array indices are fixnums" a few times though, even on sbcl with relatively large fixnums, much less clisp with 24bit fixnums :)
17:21:25
|3b|
though i probably wouldn't expect much of anything to work on an implementation with A-T-S-L = 1024 :)
17:22:14
shka_
but at least my pipe runs 165% of normal speed and now i can use it whenever i want it with just one line of code so that's nice
17:25:38
pjb
AeroNotix: yes. Or you can write: (if (< (length x) call-arguments-limit) (apply #'+ x) (reduce #'+ x))
17:26:38
pjb
apply may sort the arguments according to type or magnitude, so it may give more precise results than reduce.
17:28:04
pjb
(reduce (lambda (a b)(+ a b)) '()) #| ERROR: Too few arguments in call to #<Anonymous Function #x302006ADAE4F>: 0 arguments provided, at least 2 required. |#
17:32:51
|3b|
if order matters, i'd probably rather have it consistent than break when you add 1 more item to list :)
17:34:33
pjb
(values (+ 1e0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6) (+ 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e0)) #| --> 1.0000095 ; 1.00001 |#
17:35:12
|3b|
also, some implementations set call-arguments-limit to values larger than you'd want to apply due to stack size limits anyway
17:36:30
pjb
(defun f (&rest args) args) (let ((list (list 1 2 3))) (eq (apply #'f list) list)) could return T.
17:37:31
pjb
3.4.1.3 The value of a rest parameter is permitted, but not required, to share structure with the last argument to apply.
17:57:32
oni-on-ion
Bike: i've just seen the library SERIAL, which led me to folio2 - im surprised i havent come across it before today!
18:15:57
pjb
And thankfully, file-position returns nil when it cannot seek; but it still can signal an error when the position is too big or inappropriate.
18:16:12
pjb
The problem here is that we don't know if (1+ pos) or (1- pos) are appropriate positions.
18:20:12
jasom
pjb: file n. a named entry in a file system, having an implementation-defined nature. <-- I disagree that a posix named fifo is not a file
18:20:17
pjb
That said, you're right that file-position only specifies a STREAM, so it could work on other type of streams, and it could be possible to find file-streams that are not seekable for soem reason.
18:21:25
pjb
Notably: (with-open-file (stream "/tmp/foo") (pathname stream)) could return #P"/tmp/foo" for fifos.
18:22:09
jasom
though I'm not sure what is appropriate for (open a-stream-that-is-not-a-file-stream)
18:24:06
pjb
And there are people who would like to write a new CL standard, when 22 years later, we still haven't debugged all the implementations!
18:25:09
aeth
pjb: A new standard would only help portability. Right now, there are SBCL-only libraries that don't need to be.
18:26:24
dlowe
I think a new standard would mostly be about removing things and making them more regular to make implementation simpler
18:29:13
aeth
dlowe: The not very controversial things I'd like to see are (1) lower the minimum requirements for short-float so IEEE half-precision floating-point can be used (short float was originally meant for unboxed float in 32-bit implementations) and (2) raise the minimum requirements for most other things, which seemed to have been written with 16-bit in mind (e.g. the 1024 minimum array size, which includes string length)
18:29:46
aeth
Ideally, the minimums would be different for 32-bit and 64-bit implementations and the implementation would say in some standard way which set of minimums it is following. Then a library that needs the higher minimums could choose to only support the 64-bit one, for instance.
18:30:12
pjb
aeth: just patch an implementation to do it. And make it compatible with cuda for a big win.
18:30:25
aeth
And finally, it would be very useful for the specialized-arrays that (almost) everyone implements to be part of the standard, not just bit and character arrays. This means (unsigned-byte 8) and single-float and a minimum. Ideally double-float, too.
18:32:29
aeth
pjb: Anyway, these little things don't need to be part of a new standard, they could be their own independent standard. And the non-conforming short-float could be hid behind a flag that defaults to NIL, like some of SBCL's non-conforming behavior is
18:37:54
jasom
dlowe: I'd also like a few hooks in the reader. Several things that are proposed new features could be done in libraries if the reader were just slightly more flexible
18:46:17
DGASAU
jasom: "what is file" is very famous discussion that happened back in FTN days in RU.OS.CMP :)
18:47:15
dlowe
I also think that proposed new features are still valuable even if they potentially could be implemented in libraries
18:48:04
dlowe
primarily because they communicate "these features are your toolset and should be everywhere."
18:49:06
jasom
dlowe: I agree. If we are only going to add new standard features every 30ish years though, then perhaps we should make sure that the standard allows for implementing some of those features as portable libraries
18:51:18
dlowe
I mean, you can just look at the people who prefer to use loop over iterate and see the power of the standard library
18:51:58
jasom
heh, I got a bad taste in my mouth because when iterate was introduced it used a very poorly written loop in one of its examples of why it is better than loop
18:52:55
aeth
I prefer to use anything in the standard other than loop if possible. I think collect is my main use of loop because I don't know of a simpler or even equivalent way to do it portably.
18:53:40
aeth
jasom: Yes, but once you're thinking about setfing the cdr of the list you're now writing something that's going to be at least twice as complicated, probably.
18:55:44
aeth
jasom: I've written that algorithm before for custom cons-like data structures and it's nowhere near as trivial as just using loop ... collect
18:57:27
jasom
yeah; off the top of my head: (let* ((head (cons nil nil)) (tail head)) (setf (cdr tail) (cons newitem nil) tail (cdr tail)) (cdr head))
18:59:06
aeth
dlowe: Well, you can use the mapfoo for some, but not all, of the cases where collect works. They definitely won't work for e.g. collecting into two lists based on a conditional
19:01:20
aeth
here's something that's not *quite* trivial, but you need loop to make it even this simple afaik: (loop for i from 0 below 42 if (evenp i) collect i into evens else collect i into odds finally (return (values evens odds)))
19:02:30
jasom
Turning this into a macro wouldn't be too hard: (let* ((head (list nil)) (tail head)) (flet ((collect (item) (setf (cdr tail) (list item) tail (cdr tail)))) ... (cdr head))
19:09:34
vsync
I'm building a system that has some similarity in terms of a hierarchical ordered set of operations and want to learn any lessons from it
19:09:37
jasom
aeth: https://pastebin.com/dFqXmixc <-- more complicated than loop, but not by much IMO.
19:09:47
aeth
jasom: What's probably needed is a library of minimal macros and/or higher order functions for iteration that look like they could have been in the standard. Most could be very trivial, e.g. do-hash-table (like dolist) is just a tiny wrapper on top of maphash
19:10:14
jasom
I find loop to be 1000x more readable than dolist since I don't need to remember the order of parameters
19:10:23
vsync
in particular why is a plan just a list of steps and not nested, and what were the tradeoffs of traverse to full depth before execute vs build a top level plan then go to execute and make little plans then
19:10:41
phoe
jasom: https://github.com/fare/asdf/blob/53f72684bbab75ae375673634e24305e0d276943/uiop/utility.lisp#L148
19:14:57
vsync
jasom: yeah, I have a memory of finding such, but all I can find presently is the manual and a few slide shows
19:16:18
vsync
hmm a little bit here http://fare.tunes.org/files/asdf3/asdf3-2014.html#(part._traverse)
19:16:52
pjb
https://medium.com/@kinwo/historical-development-of-ai-planning-and-search-a5e2b97b9483
19:18:28
pjb
Here is what I had in mind: https://en.wikipedia.org/wiki/Planner_(programming_language)
19:19:00
vsync
did you have a list of those bookmarked or is it embarrassingly like page 1 of Web search "planning things"
19:20:13
vsync
and at least the simple-planners looks like I can shallowly exploit what I want quickly
19:20:35
_sfiguser
hello all, which are alive lisp languages? is common lisp and scheme still active projects and viable options ?
19:20:36
pjb
vsync: well, you might have a look at the system construction systems, things like make, scons, maven, ants, etc. You might find some more specific algorithms.
19:21:51
phoe
_sfiguser: actively developed and used? yep, both CL and Scheme fall into that category
19:22:10
pjb
But really, what you have is the description of a hopefully acyclic graph, with labelled nodes and edges, and you have to determine goals (from the current state of the file system or other objects (eg. compiled functions and source sexp in a lisp image).), and then build a plan to obtain those goals by flowing the graph util you reach only existing nodes.
19:22:40
pjb
_sfiguser: yes, but here we will advise you to use Common Lisp, more survival stamina in there…
19:24:44
pjb
_sfiguser: CL has older roots than scheme. It has more genes. It is and will be able to survive longer. Scheme is already at its 7th revision (ie. already 8 versions of the language!) while CL has a single standard and that's it.
19:25:08
pjb
_sfiguser: Furthermore, you can run in CL lisp programs that are more than 40 years old!
19:25:24
pjb
_sfiguser: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/wang.html
19:26:20
pjb
So my bet is that it will be able to run the programs you write today in 60 years. Enough until you die programming or until the singularity whichever occurs first.
19:28:24
pjb
_sfiguser: for example: https://www.google.com/flights#flt=/m/05qtj..2018-09-16*./m/05qtj.2018-09-20;c:EUR;e:1;ls:1w;sd:0;t:h
19:29:29
pjb
phoe: the most difficult one AFAIK, would be (setf gethash), but since it fmakunbound only symbols, we're safe.
19:32:21
aeth
_sfiguser: If you don't want famous but just want some examples, there are some games you can play right now. https://dto.itch.io/
19:33:14
sjl
can't just negate OUTPUT-STREAM-P because bivalent streams. there's no (portable) INPUT-STREAM type for TYPEP
19:36:49
phoe
(defun input-stream-p (stream) (handler-bind (progn (make-concatenated-stream stream) t) (error () nil)))
19:45:35
phoe
Bike: if you accidentally (fmakunbound 'cl:handler-bind), other than it being UB, you have no portable means of reimplementing it
19:51:06
phoe
would be pointless for them to promote something not made in Lisp as a Lisp success story
19:54:42
pjb
sjl: Well, for binary streams, input-stream-p is hard: you have to read a byte. For character streams, you can use peek-char.
19:58:51
aeth
_sfiguser: Games generally use the host's OpenGL driver as well as some portability library like SDL to access windows/input/etc., so they can't really be done 100% in any language except C (and even that doesn't work because some drivers/libraries/etc. are C++)
20:00:17
_sfiguser
what do you like about lisp that is not in other programming languages which are not lisp dialects ?
20:02:47
oni-on-ion
real live coding; ie. able to change everything in runtime, class definitions too. and real macros. the `, syntax is perfect for flipping modes which i think a lot of people dont realise is very important at least cognitively
20:04:31
oni-on-ion
Julia is my favorite, it is very close to perfect in most ways, it is a truly awesome language, but without those two specific things it can't be my number 1 tongue that lisp is
20:06:38
jasom
_sfiguser: SLIME is easily the most productive development environment I've used; really a focus on good development environments seems peculiar to the lisp and smalltalk communities
20:07:49
jasom
_sfiguser: Also, the language is malleable. I started using python in 2.2, and it's gotten a lot of useful features since then, but many of the things in python that had to be language features could be implemented as a library in lisp.
20:10:10
pjb
_sfiguser: have you have a look at http://cliki.net and http://cliki.net/Getting+Started already?
20:25:32
_sfiguser
the only thing i don't like is that since i'm used to vim i find editing slow in emacs
20:26:12
jasom
_sfiguser: if you install evil-mode to emacs you are fairly vim compatible keystrokes
20:26:44
jasom
_sfiguser: control-g intsead of escape is the only real difference at that point (i.e. C-g is what you want to do to cancel where you would hit escape in vim)
20:28:09
jasom
_sfiguser: I prefer message-passing concurrency; IIRC clojure's is based upon STM; not sure if there is a library in lisp for it.
20:29:11
jasom
_sfiguser: pretty much everything is used for web programming today, since the web is kind of taking over the world
20:32:11
_sfiguser
can you make an example in code for which something is really simple in lisp but owuld be complicated in other languages ?
20:32:49
jasom
python 2.2 did not have a with statement; you could not add it to python 2.2 with a library. Implementing a new statement like that in lisp is trivial
20:33:21
shka_
_sfiguser: well, it is difficult to explain, but mind set is that instead of writing something IN lisp you are writing it ON lisp
20:36:13
aeth
_sfiguser: CL has dolist but it doesn't have an equivalent for hash tables. That's as trivial as (defmacro do-hash-table ((key value hash-table &optional result) &body body) (let ((maphash `(maphash (lambda (,key ,value) ,@body) ,hash-table))) (if result `(progn ,maphash ,result) maphash)))
20:36:32
aeth
(It's harder than it would have been if dolist didn't have an optional return value for the result)
20:39:00
pjb
(defmacro do-hash-table ((key value hash-table &optional result) &body body) `(progn ,(maphash (lambda (,key ,value) ,@body) ,hash-table) ,result))
20:39:19
aeth
Similarly, CL doesn't have something like foreach (unless you count loop as one), but you can implement a do-sequence as easily as (defmacro do-sequence ((var sequence &optional result) &body body) (let ((map-nil `(map nil (lambda (,variable) ,@body) ,sequence))) (if result `(progn ,map-nil ,result) map-nil)))
20:39:53
aeth
(I'd count do-sequence as a true foreach and not count dolist because do-sequence will work on every sequence like MAP does)
20:40:06
pjb
What I find more regretable in the dolist etc macros, is that there's a result expression, but no provision to bind a result variable. So you often have to (let (result) (do… (var … result) …(setf result …)))
20:40:30
pjb
in which case, it would be as well to write (let (result) (do… (var …) …(setf result …)) result)
20:41:23
aeth
_sfiguser: you can read it in multiple lines here: https://gitlab.com/zombie-raptor/zombie-raptor/blob/2915b4e53ed1e5113e30348a2cb470329bedb727/util/util.lisp#L245-252
20:41:24
pjb
_sfiguser: I guess he means, metalinguistically. Have a look at Structure and Interpretation of Computer Programs http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
20:41:51
pjb
of course, just copy and paste the expressions in an emacs lisp-mode buffer, insert a few new lines, and have emacs indent it.
20:42:08
ym
In what constraint logical programming system, implemented on top of CL I can use Prolog's CLPx libraries?
20:42:09
shka_
_sfiguser: kinda difficult to explain, but boils down to the fact that many lisp libs are more akin to language extensions
20:43:04
aeth
_sfiguser: For trivial macros like this, you just need to understand quasiquotation. Sometimes you don't even need that. You could just have (defmacro foo (&rest forms) (some-function-that-takes-in-a-list-and-returns-a-list forms))
20:43:11
pjb
_sfiguser: the idea is that you make the language evolve toward your problem domain, at the same time you implement your solution, so in the end, your program is not so much written in CL as in a domain specific language implemented on CL.
20:43:46
pjb
_sfiguser: and you can write macros, reader macros, and compiler macros in CL ! There are 3 different types of macros.
20:46:30
_sfiguser
do you think structure and interpretation of computer programs can be still considered a modern book? or it explains old concepts ?
20:47:35
russellw
_sfiguser, still modern, because the concepts it explains are timeless fundamentals, like algebra
20:48:11
aeth
_sfiguser: Lisp isn't popular for the same reason Google+ or Diaspora isn't popular. Network effects matter.
20:48:30
shka_
ym: one is logic programming and stuff, the other is constraints programming and stuff
20:48:31
aeth
For a programming language that matters on multiple levels. Resources, tooling, training, jobs, libraries, etc.
20:58:03
aeth
shka_: I saw https://news.ycombinator.com/item?id=17881197 and I was wondering what the equivalent in CL would be
21:02:07
shka_
aeth: i don't want to read whole blog post right now, but it does not look all that interesting
21:16:17
_sfiguser
AeroNotix, no i'm not, if i were like that i was not here... just keep into account industry
21:16:24
oni-on-ion
aeth: also i think that inheritence in CLOS is using before/after method chaining isnt it ? can be entirely customized but that 'inheritence' is just the default.
21:17:24
aeth
_sfiguser: I would check https://old.reddit.com/r/lisp/ and https://old.reddit.com/r/Common_Lisp/ as well as http://planet.lisp.org/
21:17:45
aeth
_sfiguser: The important research usually ends up at https://www.european-lisp-symposium.org/
21:18:16
aeth
Note that some things are Lisp family but majority CL and some of these things are strictly Common Lisp.
21:18:54
AeroNotix
_sfiguser: my suggestion is just learn CL and discover what it means for you and what place you find it useful.
21:19:25
aeth
_sfiguser: The most active subcommunity online is probably the Lisp games community with the IRC channel #lispgames and with regular game jams on itch.io such as https://itch.io/jam/lisp-game-jam-2018
21:19:53
aeth
_sfiguser: Most commercial activity is probably websites, but #lispweb is a dead channel. I guess it's not as fun to talk about.
21:20:37
oni-on-ion
lots of nice CL web frameworks though. radiance, weblocks, cowboy2 .... hunchentoot, cl-who, etc..
21:20:47
aeth
The wiki can also be useful but it's a mix of up-to-date and things that are 10 years out of date ime. https://cliki.net/
21:20:50
AeroNotix
and using lisp for web programming just seems an absolute waste, too. I think it was David Nolen who said "give someone the most powerful programming language and they'll make a web framework"
21:21:16
oni-on-ion
i think CL is great for web programming. especially not having to restart the server, and a lot of work with textual data.
21:22:13
AeroNotix
sure, it's a reasonable language to do it in but I dunno, feels like a disservice to the language/environment if having lots of web frameworks is a selling point
21:22:47
no-defun-allowed
I'd run SBCL through tmux and rlwrap and copy paste fixes in. Now I know about remote SLIME but it worked
21:22:49
oni-on-ion
'having lots of web frameworks as a selling point' ? maybe i am missing something herre. =)
21:23:08
aeth
Lisp is great at generating strings from s-expressions and using that as essentially an alternative to templates (e.g. for XML, HTML, CSS, JSON, SQL, and even JavaScript)
21:23:33
oni-on-ion
im going to run the lisp image on my tablet win7.1 for gfx but i will use my desktop to swank/slime it from there. so its like having two screens. fwiw ^_^
21:23:45
no-defun-allowed
It was very easy using format to convert internal data formats into text and html. Very pleasant experience.
21:24:28
no-defun-allowed
The server would also write out s expressions to a file to backup proxy lists.
21:25:04
oni-on-ion
if i really had to choose something else for webdev i would do node.js, but erlang or prolog for hardcore server stuff. i would choose CL for web sites and pages for sure. haskell was fun tho that one time =)
21:26:08
oni-on-ion
AeroNotix: perhaps i should have aimed at aeth, now im not sure, i thought you talked about it first for some reason =)
21:27:25
no-defun-allowed
Adding authentication was one time where lisp shined, I just wrapped everything in a with-authentication macro which checked for a cookie, or directed the user to log in.
21:28:26
no-defun-allowed
The bot uses hunchentoot for serving, drakma for remote calls, mini.css for aesthetics and some other stuff too.
21:30:14
no-defun-allowed
If you had a queue and something went wrong, the erroneous request would go to the back of the queue. The Lisp bot would put it to the front of the stack (just with CONS) which was much nicer given we're drawing pixels on a game board as quickly as possible.
21:31:26
oni-on-ion
AeroNotix: eh wot? i mentioned them after i read your comment about lisp web dev. idk homie
21:32:19
oni-on-ion
AeroNotix: nah i guess not. my bad; it should have indeed been aimed at aeth , my apologies
21:32:30
no-defun-allowed
I had to maintain a bot managing several bases and I only got to use it a few times to make the stupid ancap base say things like "USE EMACS" instead of "BUY BITCOIN"
21:33:33
oni-on-ion
no-defun-allowed: didnt realise that many are probably automating their efforts. hm. i remember the initial version from HN sometime ago
21:34:58
no-defun-allowed
My bot exposes an API for getting captcha tokens and also one for using a specific service too. We decided against using a captcha service cause they got expensive quickly and they weren't very humane.
21:35:26
no-defun-allowed
I have been experimenting with using pocketsphinx to solve audio captchas but it needs further training, and I'm getting into offtopic.
21:36:27
oni-on-ion
chinese clickfarms are shops with walls full of connected registered cell phones. buy mindshare
21:36:33
Jachy
Some people in the states probably too, doubt mechanical turk cares much where you're from.
21:36:45
no-defun-allowed
https://www.theguardian.com/technology/2018/jul/06/artificial-intelligence-ai-humans-bots-tech-companies
21:36:51
aeth
[image] please enter the numbers in this image to prove that you're not a bot and continue using IRC
21:36:58
no-defun-allowed
This is as far as I'm going to talk about captchas. Back to Lisp on the web thanks.
21:37:01
AeroNotix
no-defun-allowed: I'm aware of those but are you saying you didn't include captchas on a service you expose because you knew people would use clickfarms against them?
21:38:22
no-defun-allowed
AeroNotix: we had to clear captchas ourselves for the linked bot to work effectively we didn't want to support clickfarms.
21:38:55
no-defun-allowed
Occasionally the server will request a captcha token, so we take one from a queue that's not too old.
21:39:43
no-defun-allowed
We did use a two queue system for a service but that got expensive: $30 for the first day.
21:40:35
no-defun-allowed
The bot in its final days controlled more than 2000 proxies on one server without breaking a sweat (as measured by htop).
21:42:36
AeroNotix
no-defun-allowed: right so it's an online game that allows you set a pixel or something and you were using a suite of bots to bypass rate limiting?
21:46:46
no-defun-allowed
So yes, lisp helped the bot certainly get big. Stacks are more aesthetically pleasing and lisp (on portacle) was much easier to set up.
21:50:24
AeroNotix
_sfiguser: implementations of lisp or applications written on those implementations?
21:54:48
AeroNotix
_sfiguser: arguably the most popular implementation is sbcl, its development is over at https://github.com/sbcl/sbcl
21:57:08
aeth
SBCL is much more popular than CCL which is much more popular than any of the rest. The only thing that would be hard to determine is what the #3 implementation is.
21:57:37
AeroNotix
aeth: you mean that you're more sure that it is the most popular or that it isn't?
21:58:21
aeth
AeroNotix: here's some data from Quicklisp. http://blog.quicklisp.org/2018/02/quicklisp-implementation-stats-for-2017.html
21:59:16
aeth
AeroNotix: It does match my expectations that SBCL is 10x CCL which is 10x the rest and you probably can't distinguish between the rest. Well, 10x seems a bit large for SBCL vs. CCL. I wouldn't be surprised if you did a survey of #lisp and it's only 3x more popular
21:59:58
aeth
But I would suspect that if you used many different ways to get incomplete data, you'd probably wind up with SBCL at #1 and CCL at #2. They're the fastest and they have the most helpful errors.
22:00:41
aeth
CLISP in 3rd wouldn't surprise me because so many outdated resources from more than 10 years ago recommended CLISP
22:01:33
aeth
It's a shame that it'd probably be CLISP or a commercial Lisp in third because ECL really deserves the bronze medal there.
22:02:39
aeth
Jachy: If you're running something like Allegro or LispWorks you only really need one customer.
22:03:42
aeth
The people who do enterprise software love it because your customers are in the dozens instead of the millions.
22:04:47
Jachy
But they're not even on annual subscription models like the rest seem to be, so I wonder how many licenses Franz needs to sell per year to stay healthy.
22:05:47
aeth
I suspect they'll simply switch their business model to a subscription one if they start to have trouble.
22:08:58
aeth
_sfiguser: CLISP is still being developed, but it is not actively developed to the point where they are pushing out new releases regularly. I think it has been at least 5 years since its last release. It's imo very far behind a more modern implementation at this point because of all of the optional things and extensions that an implementation like SBCL or CCL supports these days.
22:10:09
aeth
I think lots of libraries at this point use at least one dependency that doesn't support CLISP.
22:13:27
AeroNotix
what is Scienteer lisp? Googling about now there's quite a lot of dead links for it
22:16:16
pjb
It was an expensive high performance commercial implementation. notice that commercial software is out of topic on freenode.
22:19:08
pjb
I don't know of any program written in it. There are more than one implementation though.
22:20:33
_sfiguser
AeroNotix, what do you mean that is very far behind a more modern implementation? i mean does it lack stuff to make it a modern language ?
22:20:38
AeroNotix
pjb: sorry I just saw a reference to it in the quicklisp statistics linked above, had a question, asked a queston
22:27:10
aeth
_sfiguser: There are lots of optional things in CL implementations that CLISP does not support, such as (afaik) single-float and double-float arrays, type checking in places where it is optional, and various popular extensions that are handled in portability libraries (you only really find out this third category if you try to test a large Lisp application in an unpopular implementation)
22:29:00
aeth
Yes, that's the unforgivable thing, making a confusing name that makes it sound like it's a way of talking about the language. It's like if a C compiler was called Cee.
22:29:26
aeth
_sfiguser: On the other hand, CLISP does have some extensions that no one else supports, like arbitrary precision floating point.
22:29:27
vsync
ACTION would never have thought of CLISP as abbreviation for Common Lisp.... seems obviously different
22:30:11
vsync
ACTION used to be inordinately fond of CLISP, probably cuz of trying to run on odd architectures in the days when the choice was that or CMUCL and have fun bootstrapping CMUCL
22:30:29
vsync
haven't run it in a while... sometimes install it just so I can see the menorah for nostalgia
22:30:47
pjb
clisp is not an abbreviation of Common LISP, but of C lisp. Ie. a lisp implemented in C.
22:30:49
vsync
feels like I should care more about running different implementations but don't really
22:33:15
_sfiguser
any good extension to do data analysis in lisp ? like managing csv files cleaning data or machine learning?
22:34:40
aeth
pjb: Yes, but enough people try to use clisp instead of cl as an abbreviation for Common Lisp so that makes me think that the name itself is problematic.
22:34:56
Jachy
Once I confused clisp with GCL. Clisp calls itself "gnu clisp" on its home page too, but it's not gnu common lisp.
22:35:29
aeth
Jachy: GNU has Emacs Lisp, two Common Lisps (CLISP and GCL), and at least three Schemes (Guile, Kawa, and MIT/GNU Scheme). That's not confusing at all.
22:37:43
aeth
I did some of the https://projecteuler.net/ problems in Lisp but that's more about cleverly solving the problem mathematically/algorithmically than learning a language.
22:38:32
aeth
Google has https://github.com/google/lisp-koans but I bet they're in a slightly archaic style because programming languages, even ones with no revision to the standard since 1994, change what's idiomatic over time
22:38:59
aeth
(An example of a style change over time: SETQ used to be about as popular as SETF, but SETF has clearly won at this point.)
22:40:02
Jachy
_sfiguser: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ this was a recently popular post on getting started with CL
22:40:49
vsync
aeth: lots of those seem to be about things from the standard slowly increasing popularity
22:41:20
_sfiguser
anyone knows instead about data science or statistics/machine learning stuff with clisp ?
22:41:55
aeth
_sfiguser: CLISP refers to an implementation. CL is the correct short name for Common Lisp.
22:42:32
Jachy
_sfiguser: also a useful resource is https://github.com/CodyReichert/awesome-cl#machine-learning
22:43:15
pjb
It's simple, in Common Lisp, there's a package named "COMMON-LISP" and it has a nickname "CL".
22:43:45
aeth
_sfiguser: if you want to visualize data you can use https://github.com/vydd/sketch or https://github.com/cbaggers/cepl or even use a graphics framework that's more game-oriented in its intent.
22:45:40
aeth
Jachy: It seems to pretty much be a random list of things that people have submitted rather than something opinionated that someone new to CL should read.
22:47:46
pjb
vsync: like in any other programming language: by testing for the base case, and calling the function recursively in the general case.
22:49:53
no-defun-allowed
vsync: you must get one lisp and put it in the other lisp but then the first lisp must also be in the second lisp
22:50:39
pjb
In my father's village, in WWII when the germans arrived, they aligne people, and asked who wanted to be German and who wanted to stay French. All but two went for German (my grandfather stayed French).
22:51:44
pjb
The lesson is that in Alsace-Lorraine, smart people know that it doesn't matter which, Berlin or Paris, they'll have to pay taxes all the same, so let's not contradict the current adminstration.
22:52:25
aeth
pjb: The lesson is that if I want to conquer anything I should start with Alsace-Lorraine, I guess.
22:53:08
pjb
Don't be so sure. We know the German, and we know the French (we're both), but it may be a different story with different people.
22:54:14
aeth
It looks like it would make an interesting border as part of Luxembourg, and it would solve the French-German hostilities because they would no longer border each other. https://upload.wikimedia.org/wikipedia/commons/3/37/German_Empire_-_Alsace_Lorraine_%281871%29.svg
23:08:03
AeroNotix
Ditto for this area. Silesia. Not sure if there's an English name for the area but roughly equivalent to Prussia
23:49:15
no-defun-allowed
how could i smooth off the alpha channel for cl-vep's background replacement function?
0:42:35
AeroNotix
regreg: unfortunately most of the "fun" work is done already. IIRC there's "libbilliards" that takes care of the majority of the ball physics
0:43:22
AeroNotix
I always wondered why there isn't a cheap over head table system that tracks ball positions. For match games where balls need to be reset (foul and a miss) then it's quite a manual job placing the balls back.
0:44:39
AeroNotix
Bike: that overhead table system I was mainly thinking about it being used in big matches. There's a rule in snooker which sometimes requires balls to be reset to their positions they were in before a foul.
0:45:08
AeroNotix
and it can take a lot of back and forth between replays to get the positions just right
0:45:32
AeroNotix
the balls are brightly coloured, the game is literally played on a green screen. Seems like it should be trivial
0:46:18
regreg
AeroNotix: if there are 4 games worth a $20million market, then with one extra good quality game you can take 1/5 of that market, meaning $4million, assuming your game quality is similar or better
0:47:16
AeroNotix
Bike: I was thinking using image processing of the state of the game play by play and use lasers to indicate older positions, if needed
0:48:27
AeroNotix
Bike: I wondered about putting something inside the balls but pros would be up in arms about stuff like that
0:50:30
AeroNotix
in other news my lisp z80 emulator can now run my z80 brainfuck interpreter code ;)
0:52:24
AeroNotix
I'm always looking for bigger and bigger roms to run on the emulator. I'm having isues assembling zexdoc/zexall with linux assemblers. Seems they're designed for ancient windows assemblers.
0:54:03
AeroNotix
indeed. There were loads of them behind the iron curtain. Clones and all sorts. All the way past the 32 bit era. People writing stuff like mortal combat for z80 based machines
0:55:08
AeroNotix
in my z80 emulator I have a plan (currently kind of almost working) where you can write a subset of CL that will compile to z80 machine code
0:57:32
AeroNotix
yeah. To be honest calling it a "subset of CL" is a bit strong. It's more "a shitty version of lisp"
0:58:53
AeroNotix
well, the z80 can by default access 64k of memory. I know in "my" version of lisp that this is oodles of memory, with plenty to spare for user programs
0:59:55
AeroNotix
The idea was just that you would define your own functions (+ a set that make sense built in) that compile directly to machine code
1:02:43
AeroNotix
vsync: it's just more complicated to create. With only a handful of chips you can create a useful z80 "computer"
1:04:13
AeroNotix
I need to actually get some hw. I've mostly been focused on creating the emulator and development tools
2:01:48
pjb
But notice that rename-package has "undefined consquences if new-name or any new-nickname conflicts with any existing package names."
2:02:13
pjb
I interpret that strictly, to mean that if there is already a package with the same name or nickname, rename-package can fail.
2:02:43
pjb
So I call it twice, using a temp name, like in com.informatimago.common-lisp.cesarum.package:add-nickname
2:03:11
pjb
But perhaps "nickname conflicts" are only when the name-package association is different?
2:04:17
pjb
In that case, removing a nickname could be done conformingly with (rename-package package (package-name package) (remove old-nickname (package-nicknames package)))
3:01:26
aeth
So normally I simplify something by making something a symbol or a list. i.e. in ((foo bar) (baz barfoo)) the first sublist binds bar to foo, but (foo (baz barfoo)) would bind foo to foo.
3:02:09
aeth
I can't do that in my particular case here, though, because I have (binding thing &key ...) instead of (binding thing)
3:02:45
aeth
The next best thing I can think of is having some symbol imply repetition, e.g. (foo * :some-key 42)