So you think Common Lisp is better than Python

Then tell me how do you split a string by delimiter in CL? (Without using libraries, don't be a pajeet)
That's what I thought

Attached: santana.jpg (750x1000, 96.54K)

Other urls found in this thread:

link,data
twitter.com/SFWRedditVideos

Don't abuse Satania-chan like that.

>cniles/seplets right now

Attached: fetchimage.png (700x394, 292.36K)

How do you do it in python without importing anything?

can python do this
echo "56,link,data with\,with a comma" | perl -nE 'my$l=join "\t", split /(?

You can use the string method "split".
Yep, method. Everything in python is an object, including a simple string containing the word "nigger".

I will never forget the day I stop hating OOP. Learn python was by far the best decision I made in my career.

based and perl pilled

i kneel
we don't even have while loops how could we ever compete

'cock-sucker'.split('-')

C/C++ string handling is fairly easy. It’s the built-in functions that are AIDS.

I can't tell if this is a troll post or if you actually think CL can't manipulate strings? Or is it because unlike in Python it requires a bit of brainpower to use substr and position functions?

oh wow he can split a string without importing a library because that function just happened to be included! what a fag kek
now try doing literally anything nontrivial without importing libraries and suddenly the entire appeal of python crumbles.

we do though

based perlchad, one-liner pilled

So you think Python is better than Common Lisp?
Then tell me how do you get a fixed-width integer? (Without using libraries, don't be a pajeet)
That's what I thought

???
(loop while condition do stuff)

(ql:quickload :cl-ppcre)

And just use regex. If you want a solution that doesn't involve external libs, let's use csv as an example:

* (defparameter *csv-readtable* (copy-readtable))
(set-syntax-from-char #\, #\Space *csv-readtable*)
(defun read-csv-line (string) (let ((*readtable* *csv-readtable*))
(with-input-from-string (stream string) (loop for object = (read stream nil nil) while object collect object))))

>cl-ppcre
why not uiop:split-sting ?

You could do that too. I was also trying to remember if Alexandria has a string-splitting util but didn't feel like looking it up.

Here's the one I just did
(defmacro while (expr &rest block)
`(tagbody
loop
(if ,expr
(progn ,@block (go loop)))))

(defun split (sep str)
(let* ((start 0)
(end 0)
(substrings (list nil))
(ptr substrings)
(len (length str)))
(while (< end len)
(while (and (< end len)
(not (char= sep (aref str end))))
(setq end (1+ end)))
(setf (cdr ptr) (list (subseq str start end)))
(setq ptr (cdr ptr))
(setq start (1+ end))
(setq end (1+ end)))
(setq substrings (cdr substrings))
substrings))

(princ (split #\space "one two three"))
(terpri)

Can someone rate this? honestly

just realised that we can return directly (cdr substrings)

It is better.
- far more efficient
- can actually distribute binaries to customers
- has a standard
- has multiple up to date implementations
- is academically interesting
- has better books