ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
karswell_ has joined #picolisp
karswell has quit [Ping timeout: 265 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Read error: Connection reset by peer]
orivej_ has joined #picolisp
orivej_ has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #picolisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
f8l has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #picolisp
f8l has joined #picolisp
orivej_ has quit [Ping timeout: 240 seconds]
rob_w has joined #picolisp
<tankf33der> hi all
<tankf33der> Regenaxer: question about json
<tankf33der> trying write json manually
<tankf33der> http://ix.io/2nyC
<tankf33der> thinking how to simplified prinl lines.
<Regenaxer> A single 'prinl' instead of many?
<Regenaxer> Hi tankf33der btw ;)
<tankf33der> but prinl eating my json strings: "name":"mike"
<Regenaxer> cause not displaying the double quotes?
<Regenaxer> and avoid the "\"" quoting?
<tankf33der> yea
<tankf33der> never did it before
<Regenaxer> right, it is ugly
<Regenaxer> If you use 'println', you get spaces in between
<Regenaxer> "name" : "mike"
<tankf33der> spaces is ok
<tankf33der> playing.
<Regenaxer> Or write a custom printing function?
<tankf33der> or use printJson from json.l
<tankf33der> it expecting list somehow.
<Regenaxer> yeah
<Nistur> mornin'
<Regenaxer> Hi Nistur
<Nistur> hulloo
<beneroth> Good morning all
<beneroth> if we can wish printing functions, then I would wish for (prinsp)
<Regenaxer> Not so very useful, I think
<Regenaxer> You can always do (prin Any " " ...)
<beneroth> that's what I do :)
<aw-> tankf33der: you can also use my json.l lib ;)
<beneroth> Regenaxer, but the same argument applies to (printsp), no? :P
<beneroth> just saying, nothing has to change
<tankf33der> aw-: sure, thanks. but i want in raw myself. uniq and rare moment to have fun.
<beneroth> parsing is much work, if you want to catch all eventualities
<beneroth> I usually use (state) to build a FSM
<aw-> tankf33der: you can inspire yourself from my code as well
<tankf33der> aw-: ok
<Regenaxer> beneroth, no, (print Any " ") does not help
<Regenaxer> You nee (print Any) (space)
<beneroth> ah, T
<Regenaxer> thats why there is 'printsp'
<beneroth> I see, thanks for the explanation!
<Regenaxer> :)
karswell_ has quit [Remote host closed the connection]
karswell_ has joined #picolisp
<aw-> Regenaxer: i made a change to http.l to capture the additional HTTP headers
<aw-> and patch:
<Regenaxer> hmm, are they really needed?
<aw-> maybe it's not optimal
<aw-> yes for me, very needed
<Regenaxer> Interesting, in what casees?
<aw-> some servers send special HTTP headers which contain important informaton
<Regenaxer> servers?
<aw-> ex: GitHub webhooks sends the payload SHA1 hash to verify if it's valid
<aw-> x-hub-signature header
<Regenaxer> ah!
<Regenaxer> I thought you mean PUT or DELETE HTTP requests
<aw-> no no
<Regenaxer> ok
<Regenaxer> So '*Headers' should also be cleared?
<Regenaxer> At start of 'http'
<aw-> oh, yes
<aw-> i can give it another name, doesn't matter
<Regenaxer> The name is good I think
<Regenaxer> perhaps *HttpHeaders ?
<aw-> that's good too, less ambiguous
<Regenaxer> T
<Regenaxer> I think forthe '(when @' should better be a cond instead of 'if'
<Regenaxer> hmm
<Regenaxer> maybe I don't really understand
<Regenaxer> I forgot the details
<Regenaxer> hmm
<Regenaxer> it is strange
<Regenaxer> (if (eol) (char) (when @
<Regenaxer> '@' is never set
<Regenaxer> ah, forget that :)
<Regenaxer> So 'cond' seems more natural
<Regenaxer> (cond
<Regenaxer> ((eol) (char))
<Regenaxer> (@ (push '*Headers (list @ (cdr (line))))) )
<Regenaxer> What do you think?
rob_w has quit [Quit: Leaving]
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
<aw-> Regenaxer: sorry was afk
<aw-> yeah that looks good to me
<aw-> are you planning to add that to the library?
<beneroth> being able to handle arbitrary HTTP headers is useful and important, I agree
<Regenaxer> Yes, but I need to be absolutely sure that it is safe and well tested
<Regenaxer> I don't want to break my production apps
<beneroth> becomes only more important, as more and more protocols get replaced by HTTP for no good reason (well lazy firewall admins and ignorance)
<beneroth> the only danger I see is DDOS-vulnerability by using (line), but that problem you have also with the initial HTTP line
<beneroth> ugly to handle better.
<aw-> Regenaxer: great, yes that makes sense
<aw-> please test it and make sure it's not dangerous or breaking things
<aw-> i never used @ in the (T catch-all) of a (case) statement, so i'm not sure if that was proper usage
<beneroth> @ is set by (case)-condition same as with (if)(when)(ifn)(unless) etc.
<aw-> yeah that' what I figured
<aw-> beneroth: did you try the headers patch?
<beneroth> no, I only viewed the code
<Regenaxer> yes, me too
<Regenaxer> Don't know how to test it. It is more a matter of thinking all possibilities. I my use cases additional headers don't appear, so there is no direct testing
<aw-> perhaps it's a good idea to validate the length of the headers, because too long could cause DoS of the application
<beneroth> aw-, I think that is the general problem about DDOS risks of the standard http.l
<Regenaxer> There is no clear limit
<beneroth> T, standards have no limits
<Regenaxer> yes, DDOS attacks are possible in many ways
<Regenaxer> I use bin/watchdog to kill hanging apps
<aw-> i set my limit to 8192 Bytes total for all headers combined
<beneroth> reverse proxy? :)
<aw-> in my custom http.l which I havent open sourced yet ;)
<beneroth> there can and should be reasonable limits, but of course they're per application :-)
<beneroth> I see
<Regenaxer> How about the performance impact? Will it collect many lists of characters in *HttpHeaders, as usually many headers appear?
<Regenaxer> Currently they are just skipped
<aw-> yes possibly
<Regenaxer> Perhaps it would be better to provide a list of headers you are interested in, instead of collecting all and searching them?
<aw-> that's why i set a limit to 8K
<Regenaxer> No, not that limit
<Regenaxer> I mean unnecessary consing of lists on each request
<Regenaxer> garbage collection etc
<aw-> hmmm
<Regenaxer> hmm, better not include it always
<Regenaxer> only when needed
<Regenaxer> Cause normal app don't need it
<aw-> right.. well that's why I wrote the (patch)
<aw-> so i can include it when necessary
<Regenaxer> yeah
<Regenaxer> yes, and publish it
<aw-> wasn't intending to add it to the public http.l
<Regenaxer> I thought first it might be a good idea
<Regenaxer> and it is perhaps
<Regenaxer> don't know ;)
<aw-> it's useful for specific use-cases as you say
<Regenaxer> Can you publish it on your repos?
<aw-> i add it here as a public gist:
<Regenaxer> Good
<Regenaxer> BTW, I'm thinking to change also the form gui (not http.l and xhtml.l) in pil21
<Regenaxer> no longer POST forms
<Regenaxer> but serverSentEvents
<Regenaxer> Sadly will not run without JS any more
<Regenaxer> But is a lot simpler and more stable
<Regenaxer> Let's see how it works out
<Regenaxer> If it does, I will use it soon
<Regenaxer> already with pil64 in current applications
orivej has joined #picolisp
<aw-> hmmm
<aw-> with HTTP/2 support?
<aw-> i dont think it's a good idea
<Regenaxer> Why?
<aw-> there's an issue with SSE if you're not using HTTP 2
<aw-> browsers limit to max 6 open connections per BROWSER
<aw-> not per tab
<Regenaxer> I won't use many sockets
<aw-> wait i'll find the link
<Regenaxer> ok, thanks
<aw-> just scroll down a bit, there's a big warning
<beneroth> thanks aw-, I didn't know
<beneroth> I still feel a bit mixed about HTTP/2 (and now even HTTP/3 is coming)
<aw-> ok if you don't use more than 6 then i guess it's fine
<Regenaxer> I see
<Regenaxer> I plan to reuse one socket until it is closed
<Regenaxer> How is the state of HTTP/2 ?
<aw-> beneroth: yes same here, http/2 is a mess, great benefit of binary protocl + fixed header sizes, but difficult to implement and debug :(
<beneroth> Regenaxer, established standard, but not replacing HTTP/1
<Regenaxer> I have never looked at it
<beneroth> HTTP/3 is not fully finished/deployed yet, I think
<Regenaxer> What is messed in HTTP/2?
<aw-> Regenaxer: the problem is complex
<Regenaxer> ok, no worry then :)
<beneroth> aw-, I suspect most of its benefits could have been achieved by just rolling out HTTP Pipelining (which was part of HTTP/1.1 but disabled because of.. stupid or so)
<aw-> sure
<Regenaxer> HTTP Pipelining is the same as multi transactions per connection?
<beneroth> yes
<Regenaxer> ok
<Regenaxer> this worked well in http/1
<beneroth> yes, until all browsers disabled it because of buggy servers / buggy proxies
orivej has quit [Ping timeout: 240 seconds]
<Regenaxer> oh, did not know
<beneroth> disabled = you have to edit browser settings to enable it
<Regenaxer> but here it works well
<beneroth> because.. you know.. HEADERS.. were meant for negotiating such things, but people are stupid
orivej has joined #picolisp
<Regenaxer> I noticed immediately if it was not there
<aw-> i actually like the QUIC protocol
<aw-> surprisingly
<aw-> i think that was renamed to HTTP/3
<beneroth> I don't know. when I wanted to play with it many years ago, it was already hard disabled on browsers
<Regenaxer> You notice in pil apps eg. in a search dialog, then scroll
<beneroth> aw-, QUIC was the parent of HTTP/2
<Regenaxer> It should be very slow if all on separate connections
<aw-> beneroth: no no
<beneroth> no?
<aw-> QUIC is over UDP
<aw-> http over udp
<beneroth> you are right, its the parent of HTTP/3
<beneroth> still, I think this is stupid
<beneroth> the problem is the websites becoming so huge
<beneroth> thousands or millions of elements is normal, hundreds of file, multiple megabytes, for a single page
<Regenaxer> yes, stupid
<beneroth> but well, makes it easy for me to be better with picolisp
<aw-> beneroth: yes agree
<Regenaxer> Anyway, good info with the max 6 sockets
<Regenaxer> I'll take care
<aw-> and that's exactly why I hate HTTP/2, they designed it so that people can validate trying to push too much useless content over a single TCP connection
<beneroth> it's like building more/bigger streets when there is too much car/truck traffic (a regular political topic here in Switzerland)
<beneroth> half a year after increasing the infrastructure its full again
<Regenaxer> There are many stupid protocol designs in that area, like the format of chunked transfers, or URLSs with non-ASCII characters. Terrible!!
<beneroth> it's externalization of costs by website creators, essentially
<beneroth> payed by all internet users
<beneroth> Regenaxer, hey smileys in URLs is really something the world needs! :-)
<Regenaxer> exactly
<beneroth> well I think the URL should stay visible for the user
<beneroth> (Google intends to remove it eventually)
<Regenaxer> But it starts with umlauts
<Regenaxer> utf8 would be fine
<beneroth> and when it is visible to the user, it should be utf8
<beneroth> you mean domain encodings, right?
<Regenaxer> yes
<beneroth> that one is stupid, yes
<Regenaxer> extremely complicated
<beneroth> xs-blablablgarbsomedomain.tld is super readable!!
<beneroth> xD
<Regenaxer> Same with chunked transfers
<Regenaxer> Good only for very static systems
<Regenaxer> i.e. fixed buffer sizes
<beneroth> you mean the "hey we need something.. lets take something.. let's see..MIME standard?"
<beneroth> or what do you mean?
<Regenaxer> with the chunked thing?
<beneroth> Regenaxer, I see, once we solved the server side once and for all, next we have to implement our own browser using PLIO as transfer protocoll
<beneroth> Regenaxer, aye
<Regenaxer> T
<beneroth> it's the most annoying part of an HTTP implementation
<beneroth> off-by-one error fun etc.
<Regenaxer> yes
<beneroth> similiar to non-aligned binary parsing
<Regenaxer> Anyway, good to know. I'll optimize socket usage
<Regenaxer> Should be no problem
<aw-> OK
<Regenaxer> Good that you showed this problem
<aw-> well, you can always switch to HTTP/2 ;)
<aw-> problem solved
<aw-> aahaha
<Regenaxer> :)
<beneroth> I understand that HTTP/3 is intended to replace HTTP/2 (functionality-wise), no?
<aw-> beneroth: yes eventually
<beneroth> problem is, Google is now the overlord of the web (because chrome dominates everything), so we might have no choice eventually ;-)
<beneroth> as Google doesn't have a big enterprise clients which lag 20 years behind, they don't have so much incentives for compatibility as MS had during their reign
<beneroth> or something like that, I guess
orivej has quit [Ping timeout: 256 seconds]
<aw-> yeah..
orivej has joined #picolisp
<aw-> i would like to see the complete death of IPv6 though
<beneroth> sure?
<beneroth> why?
<aw-> because it's incredibly poorly designed
<beneroth> I mean in dreamworld when IPv4 is dead
<beneroth> oh, really?
<aw-> well if IPv4 didn't exist then i would be fine with IPv6-only
<aw-> IPv6 was not designed with the thought that IPv4 will *need* to co-exist for another 50 years
<beneroth> T
<beneroth> it was designed with assumed agreement and cooperation that IPv4 will be killed quickly
<aw-> so because everything needs to be dual-stack, it creates a huge problem
<beneroth> but there is no incentive for ISPs
<beneroth> T
<aw-> in this case they should have just made the IPv4 address lengths longer, and not change anything else
<beneroth> and replacing those core routers in a backbone is pretty expensive
<beneroth> it's a different internet, practically
<beneroth> s/different/separate
<aw-> beneroth: it's more than that, IPv6 is so fundamentally different, makes it very difficult to have proper dual-stack support
<aw-> and many more issues with it
<beneroth> I see
<beneroth> I believe you
<aw-> ex: all traditional DHCP servers are out the window
<beneroth> I always put IPv6 on my learning todo list but never bothered to really look at it
<beneroth> T
<aw-> and since IPv6 is auto-configured. every HOST needs its own firewall
<beneroth> T
<beneroth> which was the intention with the original IPv4, but quickly done otherwise
<beneroth> no DHCP would also be a benefit for application dev
<beneroth> but privacy issues etc...
<aw-> previously we used NAT to act as a kind of "firewall", this is fine. But the IETF purists thing it's a hack even though it was their idea
<aw-> the idea of IPv6 is "the addresses are impossible to remember, so just use DNS"
<aw-> what if you don't know the IP of your DNS server?
<aw-> there's some crazy linux commands to do neighboorhood discovery, to find other hosts.. but it'll only relpies with the IP, so you still don't know what is what
<aw-> i can go on for hours, I won't :P
<aw-> just wish IPv6 would be deprecated and replaced with a more intelligent design which is fully backward compat with IPv4
<aw-> beneroth: actually I'll tell you one other issue, the one that irritates me the most, and there's no workaround
<aw-> the IPv6 packet header size is fixed to 320-bits, but it has "extra" headers which *can* be appended to it, right before the actual packet payload begins
<beneroth> wut
<beneroth> why not make it dynamically then in the first place
<aw-> the problem with the "extra" headers is you have to traverse a linked-list to find out the full size of those headers
<beneroth> yeah nice
<aw-> each header indicates if there's another extra header, and their length
<aw-> so if you're inspecting an IPv6 packet, you have to do _a lot of work_ just to separate the headers from the payload
<aw-> huge mess
<beneroth> yes I see
<aw-> they even made IPSec mandatory for IPv6 implementations, and then they canceled that and decided it would be optional hahaha
<aw-> beneroth: anyways, I kinda like the hex addressing format, and the ability to have ridiculously huge IP assignments
<aw-> but overall it's a terrible design with many hacks to "try and fix X problem"
<aw-> like DHCPv6
<aw-> and 6in4 and 4in6 and all that nonsense
<aw-> meh
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
<aw-> i didnt mention the 20 different ways of writing the exact same address.... fd00:a::0, fd00:a::0:0:0, fd00:a::0000, fd00:a::192.168.0.0, etc.. stupidshit
<aw-> ok </rant>
<Regenaxer> The old problem. Comitees can't think simple
<Regenaxer> OR? Comitees simply can't think?
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
<aw-> yes
<beneroth> yes
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej_ has joined #picolisp
miskatonic has joined #picolisp
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<Regenaxer> beneroth: Current c't magazine has an article about Jitsi configuration. Have you seen it?
<Regenaxer> Probably you know it all already :)
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
Blukunfando has joined #picolisp
<beneroth> Now, haven't seen
<beneroth> No
<beneroth> Regenaxer, thanks for the tip
<Regenaxer> :)
orivej has quit [Read error: Connection reset by peer]
orivej_ has joined #picolisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
casaca has quit [Quit: leaving]
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #picolisp
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
karswell_ has quit [Remote host closed the connection]
karswell_ has joined #picolisp
casaca has joined #picolisp
casaca has quit [Remote host closed the connection]
orivej_ has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp
karswell_ has quit [Ping timeout: 272 seconds]
casaca has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp