🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.lisp
33 messages
33 total messages Started by Anton Antimo Mon, 16 Nov 2026 20:11
on cl-json and slashes
#43
Author: Anton Antimo
Date: Mon, 16 Nov 2026 20:11
18 lines
1716 bytes
It seems cl-json is automatically escaping slashes when I invoke
encode-json-to-string.  I located the question

  https://stackoverflow.com/questions/60103909

that explains that the JSON spec mandates the escaping of slashes, but
doesn't really explain why, although it says there's not quite a
practical need for that.

Do you know why the escaping of slashes was considered in the first place?

My solution has been to follow the suggestion in the answer (to the
question 60109909).  So I wrote:

(defun json-response (data)
  (let ((cl-json::+json-lisp-escaped-chars+
          (remove #\/ cl-json::+json-lisp-escaped-chars+ :key #'car)))
    (cl-json:encode-json-to-string data)))
Re: on cl-json and slashes
#44
Author: Lawrence D’Oliveiro
Date: Mon, 16 Nov 2026 22:58
19 lines
1954 bytes
On Mon, 16 Nov 2026 17:11:53 -0300, Anton Antimo wrote:

> It seems cl-json is automatically escaping slashes when I invoke
> encode-json-to-string. I located the question
>
>   https://stackoverflow.com/questions/60103909
>
> that explains that the JSON spec mandates the escaping of slashes ...

The text of RFC8259 says “Any character may be escaped”. The grammar
shows slash among those characters in the “escape” set, and a few
others, including the uXXXX codes, but not “any [literal] character”.

So it would appear the formal grammar doesn’t allow the escaping of
other characters, even though the text says they can be. I would say
that part of the formal grammar is wrong.

You’re worried about unnecessary escapes, but you shouldn’t be, since
the result is still valid JSON.
Re: on cl-json and slashes
#45
Author: Kaz Kylheku
Date: Tue, 17 Nov 2026 01:03
24 lines
1856 bytes
On 2026-11-16, Anton Antimo <anton@safunu.org> wrote:
> It seems cl-json is automatically escaping slashes when I invoke
> encode-json-to-string.  I located the question
>
>   https://stackoverflow.com/questions/60103909
>
> that explains that the JSON spec mandates the escaping of slashes, but
> doesn't really explain why, although it says there's not quite a
> practical need for that.
>
> Do you know why the escaping of slashes was considered in the first place?

It allows JSON to be embedded into HTML.

Consider JSON which looks like this:

  [ "</script>" ] // oops: false positive for end of script marker.

  [ "<\/script>" ] // no problem

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
Re: on cl-json and slashes
#47
Author: Anton Antimo
Date: Tue, 17 Nov 2026 10:21
24 lines
2175 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> On Mon, 16 Nov 2026 17:11:53 -0300, Anton Antimo wrote:
>
>> It seems cl-json is automatically escaping slashes when I invoke
>> encode-json-to-string. I located the question
>>
>>   https://stackoverflow.com/questions/60103909
>>
>> that explains that the JSON spec mandates the escaping of slashes ...
>
> The text of RFC8259 says “Any character may be escaped”. The grammar
> shows slash among those characters in the “escape” set, and a few
> others, including the uXXXX codes, but not “any [literal] character”.
>
> So it would appear the formal grammar doesn’t allow the escaping of
> other characters, even though the text says they can be. I would say
> that part of the formal grammar is wrong.
>
> You’re worried about unnecessary escapes, but you shouldn’t be, since
> the result is still valid JSON.

I'm just curious why someone would escape slashes and make it the
default on a library to handle JSON (of any sort).
Re: on cl-json and slashes
#48
Author: Anton Antimo
Date: Tue, 17 Nov 2026 12:32
25 lines
2045 bytes
Kaz Kylheku <046-301-5902@kylheku.com> writes:

> On 2026-11-16, Anton Antimo <anton@safunu.org> wrote:
>> It seems cl-json is automatically escaping slashes when I invoke
>> encode-json-to-string.  I located the question
>>
>>   https://stackoverflow.com/questions/60103909
>>
>> that explains that the JSON spec mandates the escaping of slashes, but
>> doesn't really explain why, although it says there's not quite a
>> practical need for that.
>>
>> Do you know why the escaping of slashes was considered in the first place?
>
> It allows JSON to be embedded into HTML.
>
> Consider JSON which looks like this:
>
>   [ "</script>" ] // oops: false positive for end of script marker.
>
>   [ "<\/script>" ] // no problem

Interesting.  So the JSON spec was particularly thinking of HTML at its
beginning?  I never thought of JSON as too intimate of HTML, but perhaps
it was meant for the web specifically.  Thanks for the info.
Re: on cl-json and slashes
#49
Author: Kaz Kylheku
Date: Tue, 17 Nov 2026 16:44
51 lines
2905 bytes
On 2026-11-17, Anton Antimo <anton@safunu.org> wrote:
> Kaz Kylheku <046-301-5902@kylheku.com> writes:
>
>> On 2026-11-16, Anton Antimo <anton@safunu.org> wrote:
>>> It seems cl-json is automatically escaping slashes when I invoke
>>> encode-json-to-string.  I located the question
>>>
>>>   https://stackoverflow.com/questions/60103909
>>>
>>> that explains that the JSON spec mandates the escaping of slashes, but
>>> doesn't really explain why, although it says there's not quite a
>>> practical need for that.
>>>
>>> Do you know why the escaping of slashes was considered in the first place?
>>
>> It allows JSON to be embedded into HTML.
>>
>> Consider JSON which looks like this:
>>
>>   [ "</script>" ] // oops: false positive for end of script marker.
>>
>>   [ "<\/script>" ] // no problem
>
> Interesting.  So the JSON spec was particularly thinking of HTML at its
> beginning?  I never thought of JSON as too intimate of HTML, but perhaps
> it was meant for the web specifically.  Thanks for the info.

JSON is based on Javascript (the "JS"). It's possible to interpolate
JSON as a literal into Javascript code, and that in turn can be embedded
in a web page.

JSON can also be stored somewhere in a HTML and accessed by JS code via
the DOM. For instance:

    <script type="application/json" id="prefs">
      {
        "username": "John Smith",
        "theme": "dark",
      }
    </script>

Script elsewhere in that page just finds the app-settings node and
retrieves the JSON from it.

  const prefs_node = document.getElementById('prefs');
  const prefs = JSON.parse(prefs_node.textContent);

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
Re: on cl-json and slashes
#50
Author: steve g
Date: Wed, 18 Nov 2026 05:08
7 lines
1417 bytes
Anton Antimo <anton@safunu.org> writes:


> I'm just curious why someone would escape slashes and make it the
> default on a library to handle JSON (of any sort).

Microsoft.
Re: on cl-json and slashes
#51
Author: Kaz Kylheku
Date: Wed, 18 Nov 2026 06:11
41 lines
2366 bytes
On 2026-11-18, steve g <Sgonedes1977@gmail.com> wrote:
> Anton Antimo <anton@safunu.org> writes:
>
>
>> I'm just curious why someone would escape slashes and make it the
>> default on a library to handle JSON (of any sort).
>
> Microsoft.

I'm obviously not Microsoft:

This is the TXR Lisp interactive listener of TXR 302.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
1> (put-json #("foo" "/bar"))
["foo","/bar"]t
2> (put-json #("foo" "</bar"))
["foo","</bar"]t
3> (put-json #("foo" "</s"))
["foo","</s"]t
4> (put-json #("foo" "</sc"))
["foo","</sc"]t
5> (put-json #("foo" "</scr"))
["foo","</scr"]t
6> (put-json #("foo" "</scri"))
["foo","</scri"]t
7> (put-json #("foo" "</scri>"))
["foo","</scri>"]t
8> (put-json #("foo" "</script>"))
["foo","<\/script>"]t

Yes, escaping every slash, regardless of whether it causes a
script end tag ambiguity, would annoy users.

A slash is a path separator; a shit ton of strings that end up in JSON contain
URLs and paths. To have a backslash on each path separating slash would be
insane.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
Re: on cl-json and slashes
#53
Author: Anton Antimo
Date: Wed, 18 Nov 2026 13:30
53 lines
3092 bytes
Kaz Kylheku <046-301-5902@kylheku.com> writes:

> On 2026-11-17, Anton Antimo <anton@safunu.org> wrote:
>> Kaz Kylheku <046-301-5902@kylheku.com> writes:
>>
>>> On 2026-11-16, Anton Antimo <anton@safunu.org> wrote:
>>>> It seems cl-json is automatically escaping slashes when I invoke
>>>> encode-json-to-string.  I located the question
>>>>
>>>>   https://stackoverflow.com/questions/60103909
>>>>
>>>> that explains that the JSON spec mandates the escaping of slashes, but
>>>> doesn't really explain why, although it says there's not quite a
>>>> practical need for that.
>>>>
>>>> Do you know why the escaping of slashes was considered in the first place?
>>>
>>> It allows JSON to be embedded into HTML.
>>>
>>> Consider JSON which looks like this:
>>>
>>>   [ "</script>" ] // oops: false positive for end of script marker.
>>>
>>>   [ "<\/script>" ] // no problem
>>
>> Interesting.  So the JSON spec was particularly thinking of HTML at its
>> beginning?  I never thought of JSON as too intimate of HTML, but perhaps
>> it was meant for the web specifically.  Thanks for the info.
>
> JSON is based on Javascript (the "JS"). It's possible to interpolate
> JSON as a literal into Javascript code, and that in turn can be embedded
> in a web page.

I see---that's the HTML connection then.  I guess it's been so
successful that it's often taken out of the web now.

> JSON can also be stored somewhere in a HTML and accessed by JS code via
> the DOM. For instance:
>
>     <script type="application/json" id="prefs">
>       {
>         "username": "John Smith",
>         "theme": "dark",
>       }
>     </script>
>
> Script elsewhere in that page just finds the app-settings node and
> retrieves the JSON from it.
>
>   const prefs_node = document.getElementById('prefs');
>   const prefs = JSON.parse(prefs_node.textContent);

So cool!  I never knew that.  Thanks for showing.
Re: on cl-json and slashes
#54
Author: Lawrence D’Oliveiro
Date: Wed, 18 Nov 2026 18:35
13 lines
1598 bytes
On Wed, 18 Nov 2026 00:08:42 -0500, steve g wrote:

> Anton Antimo <anton@safunu.org> writes:
>
>> I'm just curious why someone would escape slashes and make it the
>> default on a library to handle JSON (of any sort).
>
> Microsoft.

I don’t think Microsoft is keen on the convention of using backslashes
as an escape character.

Because, you know, DOSlexia ...
Re: on cl-json and slashes
#55
Author: Anton Antimo
Date: Thu, 19 Nov 2026 14:49
10 lines
1448 bytes
steve g <Sgonedes1977@gmail.com> writes:

> Anton Antimo <anton@safunu.org> writes:
>
>> I'm just curious why someone would escape slashes and make it the
>> default on a library to handle JSON (of any sort).
>
> Microsoft.

Sorry---too terse to me.  Care to explain what ``Microsoft'' means?
Re: on cl-json and slashes
#56
Author: steve g
Date: Sat, 21 Nov 2026 00:51
41 lines
2558 bytes
Kaz Kylheku <046-301-5902@kylheku.com> writes:


> I'm obviously not Microsoft:

Yes, I know this. Microsoft in the days of DOS decided to use
backslashes \ for path seperators. so you need to do

cd \\home\\steve\\local

Microsoft usually tries to break other peoples stuff; in this case UNiX
and mac. It's like the end of line character.


> This is the TXR Lisp interactive listener of TXR 302.
> Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
> 1> (put-json #("foo" "/bar"))
> ["foo","/bar"]t
> 2> (put-json #("foo" "</bar"))
> ["foo","</bar"]t
> 3> (put-json #("foo" "</s"))
> ["foo","</s"]t
> 4> (put-json #("foo" "</sc"))
> ["foo","</sc"]t
> 5> (put-json #("foo" "</scr"))
> ["foo","</scr"]t
> 6> (put-json #("foo" "</scri"))
> ["foo","</scri"]t
> 7> (put-json #("foo" "</scri>"))
> ["foo","</scri>"]t
> 8> (put-json #("foo" "</script>"))
> ["foo","<\/script>"]t

> Yes, escaping every slash, regardless of whether it causes a
> script end tag ambiguity, would annoy users.

> A slash is a path separator; a shit ton of strings that end up in JSON contain
> URLs and paths. To have a backslash on each path separating slash would be
> insane.

Have you tried Microsoft's new editor for JSON? It will work, then break.
Re: on cl-json and slashes
#57
Author: steve g
Date: Sat, 21 Nov 2026 00:52
19 lines
1875 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> On Wed, 18 Nov 2026 00:08:42 -0500, steve g wrote:
>
>> Anton Antimo <anton@safunu.org> writes:
>>
>>> I'm just curious why someone would escape slashes and make it the
>>> default on a library to handle JSON (of any sort).
>>
>> Microsoft.
>
> I don’t think Microsoft is keen on the convention of using backslashes
> as an escape character.
>
> Because, you know, DOSlexia ...

I am on a unix machine; they do use backslashes and spaces in filenames
to break everything. Since MS-DOS.
Re: on cl-json and slashes
#58
Author: steve g
Date: Sat, 21 Nov 2026 00:54
16 lines
1760 bytes
Anton Antimo <anton@safunu.org> writes:

> steve g <Sgonedes1977@gmail.com> writes:
>
>> Anton Antimo <anton@safunu.org> writes:
>>
>>> I'm just curious why someone would escape slashes and make it the
>>> default on a library to handle JSON (of any sort).
>>
>> Microsoft.
>
> Sorry---too terse to me.  Care to explain what ``Microsoft'' means?

In the USA Microsoft is a human entity with all the rights of a citizen;
hence incorporated. Have you never heard of this company?
Re: on cl-json and slashes
#59
Author: Lawrence D’Oliveiro
Date: Sat, 21 Nov 2026 03:25
6 lines
1491 bytes
On Fri, 20 Nov 2026 19:52:33 -0500, steve g wrote:

> I am on a unix machine; they do use backslashes and spaces in
> filenames to break everything.

Unix machines can cope with backslashes and spaces in filenames.
Re: on cl-json and slashes
#60
Author: Anton Antimo
Date: Sat, 21 Nov 2026 18:34
21 lines
1886 bytes
steve g <Sgonedes1977@gmail.com> writes:

> Anton Antimo <anton@safunu.org> writes:
>
>> steve g <Sgonedes1977@gmail.com> writes:
>>
>>> Anton Antimo <anton@safunu.org> writes:
>>>
>>>> I'm just curious why someone would escape slashes and make it the
>>>> default on a library to handle JSON (of any sort).
>>>
>>> Microsoft.
>>
>> Sorry---too terse to me.  Care to explain what ``Microsoft'' means?
>
> In the USA Microsoft is a human entity with all the rights of a citizen;
> hence incorporated. Have you never heard of this company?

I know the company.  I just didn't know what you meant.  Now I do.  But
like you said in the other post, Microsoft cares about backslashes, not
slashes.
Re: on cl-json and slashes
#61
Author: steve g
Date: Wed, 25 Nov 2026 07:28
9 lines
1692 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:


> Unix machines can cope with backslashes and spaces in filenames.

Yes, these days you are correct. Years ago it was quite annoying having
spaces in the folder when gpm and bash.

Just because MS did it usually means everyone else will start doing it too.
Re: on cl-json and slashes
#62
Author: steve g
Date: Wed, 25 Nov 2026 07:30
25 lines
2176 bytes
Anton Antimo <anton@safunu.org> writes:

> steve g <Sgonedes1977@gmail.com> writes:
>
>> Anton Antimo <anton@safunu.org> writes:
>>
>>> steve g <Sgonedes1977@gmail.com> writes:
>>>
>>>> Anton Antimo <anton@safunu.org> writes:
>>>>
>>>>> I'm just curious why someone would escape slashes and make it the
>>>>> default on a library to handle JSON (of any sort).
>>>>
>>>> Microsoft.
>>>
>>> Sorry---too terse to me.  Care to explain what ``Microsoft'' means?
>>
>> In the USA Microsoft is a human entity with all the rights of a citizen;
>> hence incorporated. Have you never heard of this company?
>
> I know the company.  I just didn't know what you meant.  Now I do.  But
> like you said in the other post, Microsoft cares about backslashes, not
> slashes.

My apologies; they just drive me crazy. Thank god for Gnu software...
Re: on cl-json and slashes
#63
Author: Lawrence D’Oliveiro
Date: Wed, 25 Nov 2026 08:07
18 lines
2006 bytes
On Wed, 25 Nov 2026 02:28:17 -0500, steve g wrote:

> Lawrence D’Oliveiro <ldo@nz.invalid> writes:
>
>> Unix machines can cope with backslashes and spaces in filenames.
>
> Yes, these days you are correct. Years ago it was quite annoying
> having spaces in the folder when gpm and bash.

It is quite easy, in a shell script, to deal with any characters in a
file/directory name except a newline.

Dealing with newlines can be done, too, it is just slightly more
complicated.

Somewhere along the lead up to that point is when I decide that things
are getting too complicated for a shell script, and that I should
resort to a more facile programming language, like Python.
Re: on cl-json and slashes
#64
Author: Anton Antimo
Date: Wed, 25 Nov 2026 14:23
29 lines
2203 bytes
steve g <Sgonedes1977@gmail.com> writes:

> Anton Antimo <anton@safunu.org> writes:
>
>> steve g <Sgonedes1977@gmail.com> writes:
>>
>>> Anton Antimo <anton@safunu.org> writes:
>>>
>>>> steve g <Sgonedes1977@gmail.com> writes:
>>>>
>>>>> Anton Antimo <anton@safunu.org> writes:
>>>>>
>>>>>> I'm just curious why someone would escape slashes and make it the
>>>>>> default on a library to handle JSON (of any sort).
>>>>>
>>>>> Microsoft.
>>>>
>>>> Sorry---too terse to me.  Care to explain what ``Microsoft'' means?
>>>
>>> In the USA Microsoft is a human entity with all the rights of a citizen;
>>> hence incorporated. Have you never heard of this company?
>>
>> I know the company.  I just didn't know what you meant.  Now I do.  But
>> like you said in the other post, Microsoft cares about backslashes, not
>> slashes.
>
> My apologies; they just drive me crazy. Thank god for Gnu software...

No need to.  Yeah---long live GNU software.
Re: on cl-json and slashes
#65
Author: tfb
Date: Wed, 25 Nov 2026 19:10
14 lines
1766 bytes
steve g <Sgonedes1977@gmail.com> wrote:

> Yes, these days you are correct. Years ago it was quite annoying having
> spaces in the folder when gpm and bash.
> 

I believe it has only ever been annoying: it's always been possible, just
painful with shells.

I presume now All living unix-derivatives support unicode presumably in the
form of UTF-8 but I don't know.

-- 
tfeb.org/computer/
Re: on cl-json and slashes
#66
Author: steve g
Date: Thu, 26 Nov 2026 01:00
15 lines
1995 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:


> Dealing with newlines can be done, too, it is just slightly more
> complicated.

The point is that there are very few occasions where this happens; most
programmers probably never even thought abour the EOL character...


> Somewhere along the lead up to that point is when I decide that things
> are getting too complicated for a shell script, and that I should
> resort to a more facile programming language, like Python.

I like perl for grungy regexps and parsing... to each their own.
Re: on cl-json and slashes
#67
Author: Lawrence D’Oliveiro
Date: Thu, 26 Nov 2026 01:22
21 lines
2164 bytes
On Wed, 25 Nov 2026 20:00:12 -0500, steve g wrote:

> Lawrence D’Oliveiro <ldo@nz.invalid> writes:
>
>> Dealing with newlines can be done, too, it is just slightly more
>> complicated.
>
> The point is that there are very few occasions where this happens;
> most programmers probably never even thought abour the EOL
> character...

But you have no idea what users will do.

>> Somewhere along the lead up to that point is when I decide that
>> things are getting too complicated for a shell script, and that I
>> should resort to a more facile programming language, like Python.
>
> I like perl for grungy regexps and parsing... to each their own.

I started with Perl. For a long while, it had the edge in terms of
sheer variety of addon packages. But not any more.
Re: on cl-json and slashes
#69
Author: tfb
Date: Thu, 26 Nov 2026 08:11
17 lines
2147 bytes
steve g <Sgonedes1977@gmail.com> wrote:
> Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> The point is that there are very few occasions where this happens; most
> programmers probably never even thought abour the EOL character...
> 

If you write programs that grovel over large directory trees with files
written by naĂŻve users ('naĂŻve' here meaning 'experts in a field which just
uses computers as tools'), you *will* find filenames that include newlines.
 And carriage returns.  And tabs.  And almost anything, perhaps actually
anything, that the underlying filesystem allows.

You won't find them very often, but you must be willing to deal with them.

-- 
tfeb.org/computer/
Re: on cl-json and slashes
#71
Author: steve g
Date: Sat, 28 Nov 2026 03:34
28 lines
2545 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> On Wed, 25 Nov 2026 20:00:12 -0500, steve g wrote:
>
>> Lawrence D’Oliveiro <ldo@nz.invalid> writes:
>>
>>> Dealing with newlines can be done, too, it is just slightly more
>>> complicated.
>>
>> The point is that there are very few occasions where this happens;
>> most programmers probably never even thought abour the EOL
>> character...
>
> But you have no idea what users will do.

sure I do. they will most likely do what the software allows them to do.

>>> Somewhere along the lead up to that point is when I decide that
>>> things are getting too complicated for a shell script, and that I
>>> should resort to a more facile programming language, like Python.
>>
>> I like perl for grungy regexps and parsing... to each their own.
>
> I started with Perl. For a long while, it had the edge in terms of
> sheer variety of addon packages. But not any more.

I really like perl. I love to hear that people are no longer interested
in it because it is not new.
Re: on cl-json and slashes
#73
Author: steve g
Date: Sat, 28 Nov 2026 03:42
20 lines
2374 bytes
tfb <tfb@work.it.out> writes:

> steve g <Sgonedes1977@gmail.com> wrote:
>> Lawrence D’Oliveiro <ldo@nz.invalid> writes:
>
>> The point is that there are very few occasions where this happens; most
>> programmers probably never even thought abour the EOL character...
>> 
>
> If you write programs that grovel over large directory trees with files
> written by naĂŻve users ('naĂŻve' here meaning 'experts in a field which just
> uses computers as tools'), you *will* find filenames that include newlines.
>  And carriage returns.  And tabs.  And almost anything, perhaps actually
> anything, that the underlying filesystem allows.
>
> You won't find them very often, but you must be willing to deal with them.


Do not forget about ansi escape sequences for color. I had to get into a
server once and they changed the foreground color to black. Jerks.
Re: on cl-json and slashes
#74
Author: Lawrence D’Oliveiro
Date: Sat, 28 Nov 2026 03:54
17 lines
2138 bytes
On Fri, 27 Nov 2026 22:34:53 -0500, steve g wrote:

> I really like perl. I love to hear that people are no longer
> interested in it because it is not new.

Perl is supposed to be renowned for its conciseness, even crypticness
(crypticity?), but I’m not so sure.

I was looking at how to convert /etc/passwd data and friends to being
served up via LDAP, and came across this
<https://gitlab.com/future-ad-laboratory/migrationtools> old set of
Perl-based conversion scripts. The code for handling the passwd,
shadow and group files (all I was interested in) totals over 800 lines
of Perl.

I did a Python version <https://bitbucket.org/ldo17/passwd_to_ldap/>
that was half that size.
Re: on cl-json and slashes
#84
Author: Anton Antimo
Date: Sun, 29 Nov 2026 01:14
9 lines
1640 bytes
steve g <Sgonedes1977@gmail.com> writes:

[...]

> Do not forget about ansi escape sequences for color. I had to get into a
> server once and they changed the foreground color to black. Jerks.

Lol.  I mean---sounds like a pretty good prank.  (Not on a serious
computer.)
Re: on cl-json and slashes
#93
Author: steve g
Date: Mon, 30 Nov 2026 00:03
16 lines
1965 bytes
Anton Antimo <anton@safunu.org> writes:

> steve g <Sgonedes1977@gmail.com> writes:
>
> [...]
>
>> Do not forget about ansi escape sequences for color. I had to get into a
>> server once and they changed the foreground color to black. Jerks.
>
> Lol.  I mean---sounds like a pretty good prank.  (Not on a serious
> computer.)


Hahaha. The FBI was very upset about the stuff these ``people'' where
storing on their disc drive. So fuck off.
Re: on cl-json and slashes
#94
Author: steve g
Date: Mon, 30 Nov 2026 00:08
29 lines
2585 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> On Fri, 27 Nov 2026 22:34:53 -0500, steve g wrote:
>
>> I really like perl. I love to hear that people are no longer
>> interested in it because it is not new.
>
> Perl is supposed to be renowned for its conciseness, even crypticness
> (crypticity?), but I’m not so sure.

yes perl is known to be difficult to read.

Perl was part of the original LAMP thing. It took a serious hit when
people learned they could load the entire perl executable via crafty
URLs.

Anyways perl mas mostley replaced with PHP.

> I was looking at how to convert /etc/passwd data and friends to being
> served up via LDAP, and came across this

> <https://gitlab.com/future-ad-laboratory/migrationtools> old set of
> Perl-based conversion scripts. The code for handling the passwd,
> shadow and group files (all I was interested in) totals over 800 lines
> of Perl.


> I did a Python version <https://bitbucket.org/ldo17/passwd_to_ldap/>
> that was half that size.
Re: on cl-json and slashes
#95
Author: Lawrence D’Oliveiro
Date: Mon, 30 Nov 2026 00:33
12 lines
1867 bytes
On Sun, 29 Nov 2026 19:08:09 -0500, steve g wrote:

> Perl was part of the original LAMP thing. It took a serious hit when
> people learned they could load the entire perl executable via crafty
> URLs.

The kind of web server misconfiguration mistake that ... PHP
developers tend to make.

> Anyways perl mas mostley replaced with PHP.

That was a step backwards.
Re: on cl-json and slashes
#103
Author: Anton Antimo
Date: Tue, 01 Dec 2026 01:32
17 lines
2025 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:

> On Sun, 29 Nov 2026 19:08:09 -0500, steve g wrote:
>
>> Perl was part of the original LAMP thing. It took a serious hit when
>> people learned they could load the entire perl executable via crafty
>> URLs.
>
> The kind of web server misconfiguration mistake that ... PHP
> developers tend to make.
>
>> Anyways perl mas mostley replaced with PHP.
>
> That was a step backwards.

Agreed.  And PHP was replaced by what?  Oh, yeah, it hasn't been
replaced. :>
Re: on cl-json and slashes
#104
Author: Lawrence D’Oliveiro
Date: Tue, 01 Dec 2026 05:52
12 lines
1968 bytes
On Mon, 30 Nov 2026 22:32:23 -0300, Anton Antimo wrote:

> And PHP was replaced by what?

NodeJS and alternatives are the current web-developer hawtness,
and have been for some years now.

Python also has some presence here.

What do they have in common? The ability for your web app to have its
own full event loop, instead of being a prisoner of the traditional
PHP request/response ball-and-chain.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads