Closed RhoSigma-QB64 closed 1 week ago
Just some trivia: The force include mechanism was already there when I adapted it for $debug; Galleon had put it in place for the old Virtual Keyboard subsystem (remember the Android dream?).
Just some trivia: The force include mechanism was already there when I adapted it for $debug; Galleon had put it in place for the old Virtual Keyboard subsystem (remember the Android dream?).
Aha, didn't know that.
Some thoughts on the Http changes:
After seeing this I'm thinking I was wrong about having us encode the URL for the user, I think it would be better to expose your _EncodeUrl$
and _DecodeUrl$
functions as part of the language and leave it up to the user to correctly encode the URL passed to _OpenClient
(we would also remove the URL state logic from _EncodeUrl$
, it would just encode whatever it is given). The problem is that there's ambiguous cases where only the user would know the correct way to encode the URL (Ex. ?foo=bar&baz
). Presumably this same issue is why libcurl
doesn't do the encoding automatically either, not sure why that didn't occur to me 🤦
The separate thing is libcurl inclusion. You mentioned in the comments keeping _WhatIsMyIp$
TCP/IP-based to avoid pulling in libcurl
, but that won't work if $Unsafe:Http
is removed - all networking programs will get libcurl
because we don't know how they will use _OpenClient
. It's definitely an issue worth considering, I think the only real way to avoid it is to add a new flag to replace the $Unsafe:Http
flag (which admittedly is a bit ugly).
Long discussed, finally here :)
beforefirstline.bi
andafterlastline.bm
files in internal/support/include, which implement some CONST and helper functions and be helpful in the future for other things. Read the file header, some rules must be followed to avoid conflicts or errors with user code.Also in this PR:
_MIN
and_MAX
functions as new internal keywords to QB64PE, more or less as example how to make it.EncodeURL$
andDecodeURL$
functions here, which may be used in conjunction with the _OPENCLIENT(HTTP:url) syntaxYou may probably ignore reviewing the internal/source related commits, too many changes to the internals, so I just thought to provide the whole thing for bootstrapping.