00:30:49 -!- TheLie has quit (Remote host closed the connection).
00:53:39 <esowiki> [[RASEL]] M https://esolangs.org/w/index.php?diff=79488&oldid=79482 * PythonshellDebugwindow * (+14) /* Hello, World! */ rm redirect
01:00:03 -!- imode has joined.
01:06:05 <esowiki> [[Geo]] M https://esolangs.org/w/index.php?diff=79489&oldid=53330 * PythonshellDebugwindow * (-8) Unpipe
01:07:18 <esowiki> [[Scan]] M https://esolangs.org/w/index.php?diff=79490&oldid=53334 * PythonshellDebugwindow * (+5) unpipe ; hd
01:13:56 <esowiki> [[SON-OF-UNBABTIZED]] M https://esolangs.org/w/index.php?diff=79491&oldid=38964 * PythonshellDebugwindow * (+5545) Obligatory sample code
01:17:22 <zzo38> Does the dark mode work for web pages without any CSS specified, or with CSS specified but no colours specified?
01:18:33 <esowiki> [[PUSH]] M https://esolangs.org/w/index.php?diff=79492&oldid=78838 * Expliked * (+4)
01:26:51 -!- LegionMammal978 has joined.
01:28:11 <LegionMammal978> zzo38: In Flipfractal, what happens when you hit an entry-point character from something other than its opposing direction?
01:29:08 <LegionMammal978> E.g., if I enter a V going right, do I exit the + in the parent program going right or going up?
01:29:44 <V> I would not recommend that
01:30:11 <V> Seems needlessly painful
01:33:10 <esowiki> [[Clementine]] https://esolangs.org/w/index.php?diff=79493&oldid=72568 * CatIsFluffy * (+23) done
01:35:05 <shikhin> What is the less painful way of entering a V?
01:35:22 <V> shikhin: from the back
01:35:32 <V> or the front, depending on taste
01:35:59 <LegionMammal978> Wait a second, that page was only saying you were the one who created Memfractal, it was worded confusingly
01:36:16 <V> shikhin: look, I chose not to say it, but you chose to ask
01:36:30 -!- LegionMammal978 has quit (Remote host closed the connection).
01:36:46 <V> Looks like we've scared them off
01:46:58 <zzo38> LegionMammal978: I did not invent Flipfractal, and yes I agree it is worded confusingly.
01:50:01 -!- ais523 has joined.
01:50:21 <ais523> shachaf: zzo38: there is apparently an unofficial standard for gopher over TLS
01:50:33 -!- Lord_of_Life_ has joined.
01:50:45 <ais523> it is very simple, too: you just make a TLS connection on port 70
01:51:07 <ais523> (a gophers server distinguishes between gopher-over-TLS and regular gopher by checking to see whether the first thing the client sends is a TLS handshake)
01:51:10 -!- Lord_of_Life has quit (Ping timeout: 246 seconds).
01:51:52 <shachaf> What's the thing with TLS where the server must identify all the domain names it possibly knows about and then the client checks whether it matches?
01:51:54 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
01:52:02 <shachaf> Rather than the cient saying what domain name it thinks it's accessing.
01:52:43 <ais523> sounds like one of the many variants of SNI
01:52:53 <shachaf> TCP is presumably just a dead end if you want efficient networking protocols.
01:53:03 <ais523> the basic problem is that in most TLS connections, the server name indication is sent in the clear, so anyone listening in knows what site you're connecting
01:53:10 <ais523> and there have been various proposals to remedy that
01:53:32 <shachaf> With TLS being one of the reasons.
01:53:48 <shachaf> Hmm, I see, so eavesdroppers know whether I'm connecting to youtube.com vs. google.com or something.
01:53:59 <ais523> the basic problem is that it's hard to deploy anything like this at a small scale, because with a small hosting company, you can normally figure out which site is being connected to simply from the IP
01:54:09 <shachaf> I guess you might want to keep that information secret, especially with DNS becoming encrypted these days.
01:54:20 <ais523> so in order to really keep it private, you need a wide range of different sites that are all hosted from the same IP so people aren't sure which is which
01:54:42 <ais523> Cloudflare apparently added some sort of encrypted SNI recently, because they have the right sort of infrastructure for that
01:55:42 <ais523> I'm a little surprised that gopher is still being developed nowadays (at least, within the last couple of years)
01:56:01 <ais523> but apparently some people like it due to the lack of things like JavaScript-based adverts because the protocol can't handle them
01:56:41 <shachaf> Gophers are OK but kitty cats are where it's at, if you ask me.
01:57:11 <zzo38> I think that the web browser is the wrong place to implement encrypted DNS, since DNS is something that you will want many programs to use, not only the web browser.
01:57:15 <ais523> well, cat has even fewer features than gopher
01:57:50 <shachaf> Is QUIC a good alternative to TCP?
01:59:23 <ais523> one issue I've discovered with TCP is that in practice, you seem to need to duplicate a lot of TCP functionality to get reliable connections even when you're using TCP
01:59:32 <ais523> in real life, TCP connections have a tendency to break for no reason
01:59:37 <ais523> this somehow even happens on localhost
02:00:20 <ais523> using TLS over TCP increases the frequency at which this happens, but probably just because more data is sent
02:01:27 <ais523> oh, an idea I had recently: an equivalent of HTTP headers but for files on a filesystem (e.g. in the directory entry for a file)
02:01:41 <ais523> it struck me that HTTP headers are already a widely used standard for file metadata
02:02:42 <zzo38> Actually, my "httpdirlist" format is similar, using the same format of HTTP headers to make a directory listing format for use with HTTP, with blank lines separating directory entries.
02:03:42 <ais523> it strikes me as something of a security hole that I can't just put a file in a directory that a web browser serves, and know for certain that it won't get misinterpreted in a format I don't expect and that happens to do something malicious
02:03:47 <zzo38> Perhaps having a file in that format might also be helpful for loading "file:" URLs in a web browser, so that it can know the MIME type of each file.
02:04:06 <ais523> (e.g. there was an incident on #esoteric a while ago where someone managed a successful XSS attacks against the raw log files, even though they're plaintext)
02:06:31 <zzo38> Yes, but you should fix the HTTP server to specify the correct MIME type, presumably always text/plain for the raw log files
02:06:59 <ais523> yes, but some browsers will override the MIME type if it appears to be wrong
02:08:02 <ais523> nowadays there is «X-Content-Type-Options: nosniff» which tells the browser that the MIME type is correct and should not be changed
02:09:13 <zzo38> Use that, then, although I should think that the web browser should never override the MIME type specified by the server unless the user explicitly specifies a different MIME type
02:11:24 <ais523> apparently this option is not respected by IE < 8
02:11:36 <ais523> so there would still be a potential for XSS attacks against plaintext files on IE7 and earlier
02:11:38 <ais523> (does anyone still use those?)
02:16:34 <shachaf> ais523: What about HFS forks?
02:18:05 <ais523> shachaf: Mac filesystems have something similar to the HTTP idea I had
02:18:20 <ais523> but, I think they used something proprietary to specify file types, not MIME
02:18:25 <ais523> back when I last looked
02:18:28 <ais523> maybe they're using MIME nowadays
02:20:48 <ais523> oh wow, now I'm reading about CORB
02:21:36 <ais523> the basic idea is that there are only a few types of thing that can be included into a web page via a cross-origin request, such as scripts and images
02:22:18 <ais523> so if a web page tries to make a cross-origin request using <img> or <script> or whatever, but it starts with a character sequence that can't possibly start a valid image or script or the like, you stop reading so that the information doesn't end up in your process's memory
02:23:12 <ais523> but the spec is so concerned about not breaking backwards compatibility that it starts getting worried about things ilke polyglots, and CSS files that start with closing brackets (apparently not banned by the spec even though it's useless_
02:24:31 <fizzie> I think we definitely set X-Content-Type-Options: nosniff for the HackEso repo browsing.
02:24:33 <esowiki> [[NUMPAD]] https://esolangs.org/w/index.php?diff=79494&oldid=30469 * LegionMammal978 * (+96) /* External resources */ fixed links
02:24:49 <ais523> I think we changed that after the attack succeeded, yes
02:25:17 <fizzie> That's always been the default for fshg, and I think I at least tried to configure it like that very early on for the tmp.
02:25:24 <fizzie> Logfiles, I'm less sure about.
02:26:22 <fizzie> (Is that thing down again? Stalker mode breaks it annoyingly often.)
02:26:53 <shachaf> Isn't tmp from last year or something?
02:27:02 <shachaf> `` doat | grep `mkdir tmp`
02:27:07 <HackEso> Usage: grep [OPTION]... PATTERNS [FILE]... \ Try 'grep --help' for more information.
02:27:11 <shachaf> `` doat | grep 'mkdir tmp'
02:27:16 <HackEso> 9600:2016-11-02 <shachäf> ` rm tmp; mkdir tmp
02:27:39 <HackEso> 8116:2016-05-24 <shachäf> ` echo ignored > .hgignore \ 8117:2016-05-24 <shachäf> ` rm ignored .hgignore \ 8118:2016-05-24 <shachäf> ` echo ishare > .hgignore \ 8120:2016-05-24 <shachäf> ` mv ishare ignored; echo ignored > .hgignore \ 8121:2016-05-24 <shachäf> ` echo $\'syntax: regexp\\n.*\' > .hgignore \ 8129:2016-05-25 <fizzïe> ` echo \'^tmp/\' > .hgignore # kablam? \ 9592:2016-11-01 <shachäf> ` echo ^canary >> .hgignore \ 9594
02:28:07 <ais523> <fizzie> (Is that thing down again? Stalker mode breaks it annoyingly often.) ← I'm getting a 502 trying to read the logs directory, and currently have a stalker mode tab open
02:28:29 <fizzie> You get the 502 when I restart it.
02:28:42 <fizzie> And I imagine it's your tab that keeps breaking it, not that it's your fault.
02:28:52 <ais523> do you want me to close the tab?
02:29:16 <fizzie> We'll see if it stays up for longer.
02:29:23 <fizzie> I mean, if you don't mind. There's either a bug in CivetWeb's websocket support, or in how I use it.
02:29:35 <fizzie> But I couldn't figure out how I'd be using it wrong from the (poor) documentation.
02:29:40 <shachaf> This is a pomegranate. Do you like this?
02:30:49 <ais523> I did a GET /logs/2020-12-18-raw.txt HTTP/1.1 over telnet
02:31:09 <ais523> and the response contained Content-Type: text/plain; charset=utf-8, but no X-Content-Type-Options: nosniff
02:31:12 <fizzie> I did a curl -I on it.
02:31:24 <fizzie> Yeah, didn't think we did it on that, just the repo-browsing.
02:31:26 <ais523> just Server, Date, Content-Type, Transfer-Encoding, and Connection
02:31:43 <fizzie> Incidentally, those "raw" logs aren't actually the "native" raw logs, I just generate that format since it's the ad-hoc standard now.
02:32:07 <ais523> they don't look nearly as HTMLish as the parsed logs
02:32:18 <ais523> so I guess you'd have to spam a lot of HTML tags just after midnight in order to mount an attack
02:33:08 <fizzie> It does start with a "tag" thanks to the <> direction indicators.
02:33:17 <fizzie> Though a pretty weird tag.
02:34:04 <fizzie> Hmm, I thought I had an endpoint for the actual raw logs too, but apparently not.
02:37:21 -!- Arcorann_ has quit (Ping timeout: 265 seconds).
02:37:57 <ais523> and after reading through some more: apparently X-Content-Type-Options: nosniff isn't always respected because apparently Cloudflare sometimes adds it automatically in cases where the MIME type is actually wrong
02:38:15 <ais523> so browsers are now having to second-guess the statement that the MIME type is correct…
02:39:43 <ais523> one project I'm currently working on is a "safe" subset of HTML (the idea is that you specify an HTML page as a data structure, run it through the generator, and get some HTML that you know cannot be malicious because it was written in a subset that doesn't support any misusable features)
02:40:10 <ais523> but I'm not sure if there's any way to even handle hyperlinks in something like this
02:53:18 <b_jonas> "< ais523> one issue I've discovered with TCP is that in practice, you seem to need to duplicate a lot of TCP functionality to get reliable connections even when you're using TCP" => I think there was a proposal to solve that, with a middle-level protocol that looks sort of like TCP for the programs using it but does a bit more, especially being able to reestablish the connection if the client's IP
02:53:24 <b_jonas> changes, aimed mostly for mobile phones.
02:54:15 <fizzie> A friend of mine did some work/research on HIP back in the university days, I think.
02:54:44 <fizzie> That's got a mobility thing in it.
02:57:43 <b_jonas> "<fizzie> Incidentally, those "raw" logs aren't actually the "native" raw logs, I just generate that format since it's the ad-hoc standard now." => makes sense, given that you backfill logs when your log bot wasn't connected to the channel from other log sources
02:58:56 <fizzie> There's that, too. Though one of those sources *is* the raw logs from codu, where I got that format from.
02:59:36 <b_jonas> fizzie: I see. that only applies to before 2016, right?
03:00:31 <fizzie> Yeah. The other source I have a backfill converter is just my personal logs.
03:03:46 -!- also_uplime has quit (Quit: quit).
03:04:03 -!- uplime has joined.
05:34:40 * int-e grumbles about reading comprehension
05:52:18 -!- callforjudgement has joined.
05:53:18 -!- ais523 has quit (Read error: Connection reset by peer).
06:08:47 <int-e> b_jonas: btw I realized that the door gadget can be reduced to... https://int-e.eu/~bf3/tmp/aoc2.png
06:10:34 -!- callforjudgement has quit (Quit: quit).
06:11:10 <int-e> b_jonas: The new semi-open state looks dangerous because it blocks off the 'close' path. However, we can only get into this situation by using the 'open' path without actually using the door... so if we end up in that situation, we can backtrack and bypass the 'open' pass completely.
06:17:32 <shachaf> Oh no, I accidentally solved today's well-ordering theorem problem.
06:17:42 <shachaf> People were talking about precedence parsers so I couldn't resist.
06:18:12 <shachaf> But I don't have an account so I can't really confirm it.
06:18:30 <int-e> So you didn't get to the great twist in part 2
06:18:53 <shachaf> Is the twist that + is stickier than *?
06:19:08 <shachaf> It was a 2-character change in my parser.
06:19:19 <shachaf> I mean, assuming it's correct, which I didn't test.
06:19:58 <shachaf> Does it give the last test case the value 23340?
06:20:41 <int-e> I skipped the description, wondered why my answer was wrong, then realized that if those were standard expressions, I should've fed them into something like bc instead, then read the problem properly...
06:21:27 <int-e> And to top it off I messed up the change for part 2.
06:21:38 <int-e> It wasn't a good performance today.
06:22:16 <int-e> 23340 seems to be correct
06:22:52 <int-e> I did not have any recent practice writing expression parsers.
06:24:02 <shachaf> It's too bad almost everything people write about precedence parsers is way too complicated.
06:24:07 <int-e> But the main failing was to assume too much rather than reading the damn specification.
06:24:32 <shachaf> For example the Wikipedia example code has nested loops for no reason.
06:26:01 <int-e> I decided to use parsec which annoyingly, makes left recursion hard. And while it has dedicated expression parser functionality that basically just takes a list of operators and their precedence and associativity, I didn't want to read up on that on the spot.
06:26:50 <int-e> This stuff: https://hackage.haskell.org/package/parsec-3.1.14.0/docs/Text-Parsec-Expr.html
06:27:13 <shachaf> I wrote a C parser: https://slbkbs.org/tmp/pa.c
06:30:30 -!- arseniiv has joined.
06:45:50 <int-e> shachaf: well I'd habitually split the parse function up in one per precedence
06:46:17 <shachaf> But this approach ("precedence climbing") is way better.
06:47:14 <int-e> but you're arguing against a habit
06:48:41 <int-e> only 8.3GB free...
07:21:26 -!- rain1 has joined.
08:14:33 -!- sprocklem has joined.
08:23:01 -!- Sgeo has quit (Read error: Connection reset by peer).
08:55:48 -!- Arcorann_ has joined.
08:56:42 -!- imode has quit (Ping timeout: 256 seconds).
09:40:21 -!- delta23 has quit (Quit: Leaving).
10:04:26 -!- sebbu has quit (Quit: reboot).
10:23:30 -!- rain1 has quit (Quit: WeeChat 2.9).
10:27:51 -!- sprocklem has quit (Ping timeout: 268 seconds).
10:33:09 -!- sebbu has joined.
10:50:22 -!- LKoen has joined.
11:22:00 -!- reformatories has joined.
12:57:47 -!- rain1 has joined.
12:58:07 <fizzie> I just wrote a regular handcrafted recursive-descent thing in Go, which (because of all the explicit `if err != nil { return nil, err }` business, which I guess in this context could've just been omitted) ended up annoyingly verbose.
12:58:25 <fizzie> Also did read the description, but still managed to get part 2 the wrong way around first.
13:25:24 <esowiki> [[FFM/FFB]] M https://esolangs.org/w/index.php?diff=79495&oldid=52386 * PythonshellDebugwindow * (-204) FSMs aren't TC (see https://cs.stackexchange.com/questions/16315/difference-between-a-turing-machine-and-a-finite-state-machine#:~:text=A%20finite%2Dstate%20machine%20is,moves%20from%20left%20to%20right.&text=Because%20finite%20states%20machines%20are,L%20can't%20b
13:29:10 -!- TheLie has joined.
13:43:08 <esowiki> [[User:Hakerh400/Proof 001]] N https://esolangs.org/w/index.php?oldid=79496 * Hakerh400 * (+4138) Proof 001
13:43:13 <esowiki> [[User:Hakerh400]] https://esolangs.org/w/index.php?diff=79497&oldid=79306 * Hakerh400 * (+50)
13:47:33 <esowiki> [[User:Hakerh400/Proof 001]] M https://esolangs.org/w/index.php?diff=79498&oldid=79496 * Hakerh400 * (+4)
13:49:24 -!- delta23 has joined.
14:15:35 -!- TheLie has quit (Remote host closed the connection).
14:23:25 -!- delta23 has quit (Ping timeout: 240 seconds).
14:25:57 -!- delta23 has joined.
14:26:09 <b_jonas> fungot, how do you spell Mississippi and how do you know your keyboard isn't broken when you do that?
14:26:09 <fungot> b_jonas: mr president, i would like to thank you again for your support. i ask you, commissioner. we propose that this oral question.
14:27:03 <int-e> how do you know your keyboard isn't broken?
14:27:35 <int-e> there are keys on there that I hardly ever use
14:28:31 <int-e> and that's just the tip of the iceberg. it could insert an extra 's' whenever I type 'lawlessnesss' and I'd probably never know :P
14:29:27 <int-e> just imagine such a device, a keyboard that inserts plausible typos whenever a person starts typing quickly
14:30:37 <fizzie> There are all these different lawlessnesses.
14:31:56 -!- LKoen has quit (Remote host closed the connection).
14:33:25 <fizzie> On that note, there's a Twitter account, @CrimeADay, which tweets a new (US) federal crime a day. I liked the one from the other day: "43 USC §1733 & 43 CFR §6302.20(e) make it a federal crime to pick someone up from a federal wilderness area using a hot air balloon."
14:33:49 -!- Arcorann_ has quit (Ping timeout: 264 seconds).
14:45:54 -!- LKoen has joined.
15:03:31 -!- LKoen has quit (Remote host closed the connection).
15:10:01 -!- Sgeo has joined.
16:00:47 -!- LKoen has joined.
16:02:28 -!- LKoen has quit (Remote host closed the connection).
16:04:07 -!- LKoen has joined.
16:05:06 -!- LKoen has quit (Remote host closed the connection).
16:37:47 -!- reformatories has quit (Ping timeout: 260 seconds).
16:42:22 -!- LKoen has joined.
16:47:56 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
17:00:53 -!- Lord_of_Life_ has joined.
17:01:54 -!- Lord_of_Life has quit (Ping timeout: 268 seconds).
17:02:13 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
17:04:27 -!- LKoen has joined.
17:49:47 -!- LKoen has quit (Remote host closed the connection).
17:56:05 -!- LKoen has joined.
17:56:38 -!- LKoen has quit (Remote host closed the connection).
18:27:54 <b_jonas> fungot, are high seas supported by mountains? or do they just float in air?
18:27:54 <fungot> b_jonas: madam president, commissioner, and i will end with a good report.
18:38:40 -!- arseniiv has quit (Ping timeout: 256 seconds).
18:43:14 -!- S_Gautam has joined.
18:54:17 -!- imode has joined.
19:07:47 <fizzie> fungot: But where's that report?
19:07:47 <fungot> fizzie: may i thank mr langen who is continuing the work of european integration: the economic reasoning behind him. the loss of biodiversity by 2010. together with the european taxpayers, who obtain better value for money in the reserve and not to the media and sport contains a number of negative points, like almost everything else the autocrat in minsk eschews no means of independent defence against the inertia, prejudices, a
19:08:16 <fizzie> fungot: Does Mr Langen have a copy of the report?
19:08:17 <fungot> fizzie: mr president, kyoto was a great success, in the natural environment, much of which i am entitled to say that these amendments will also have to inquire into the difficulties of the phare programme and by commissioning other studies. of course, primarily a task of the executive powers of the court of justice submitted videos and other documentation to prove this morality, of which 14 have been included, and it would make
19:58:37 -!- Lord_of_Life has quit (Ping timeout: 246 seconds).
19:59:15 -!- Lord_of_Life has joined.
20:13:58 -!- Cale has quit (Remote host closed the connection).
20:28:18 -!- aaaaaa has joined.
20:36:27 -!- sprocklem has joined.
20:52:11 -!- S_Gautam has quit (Quit: Connection closed for inactivity).
21:05:16 <esowiki> [[UClang*]] M https://esolangs.org/w/index.php?diff=79499&oldid=79279 * PythonshellDebugwindow * (+34) /* Instructions */ Slight reword
21:32:21 -!- aaaaaa has quit (Quit: leaving).
22:01:50 <fizzie> Is there a concise name for that search where you have a function from the naturals, you know it has some property that's true (only) for all n >= N0, and you want to find out what N0 is, so you evaluate the function on 1, 2, 4, 8, 16, ... until you have a pair where it's false for K but true for 2K, and then do a binary search in that range to find the exact value?
22:01:55 <fizzie> It's not *just* a binary search, but it's not much more either.
22:03:42 -!- Frater_EST has joined.
22:09:38 <zzo38> Do you have an example?
22:12:42 <b_jonas> fizzie: good question, I don't know
22:13:59 <rain1> exponential search
22:20:26 <shachaf> You can use any fast-growing function to find the upper bound presumably, there's no special reason for it to be doubling, right?
22:21:04 <fizzie> Presumably. Though if you're going to use a binary search for the second part, it feels natural somehow.
22:21:10 <fizzie> First you double, then you halve.
22:23:52 <rain1> doubling is the best
22:26:51 <fizzie> The Wikipedia article suggests as a variation a three-stage thing, where you start first by doubling the *exponent*, then do a binary search on the exponent to find the right interval, and then a binary search in the interval.
22:27:05 <fizzie> (And the obvious generalization from that.)
22:28:10 <b_jonas> there's always a function that you could use that grows faster than what you're using
22:28:36 <rain1> is there always one that grows slower? fib grows slower than doubling
22:28:39 <rain1> but what grows slower than fib?
22:28:43 <shachaf> Presumably in many practical applications you just do know an upper bound, like 2^64.
22:29:11 <shachaf> I guess you can call that "exponential search but starting with a high initial guess" to make it also theoretically complete.
22:32:47 -!- Frater_EST has left.
22:35:00 -!- sprocklem has quit (Quit: Lost terminal).
22:35:36 -!- sprocklem has joined.
22:36:47 <shachaf> Or mayeb the argument is that the upper bound is often small, like 8, and you can save searches over log n by finding it sooner.
22:43:18 <rain1> log(n) tends to infinity
22:57:27 <nakilon> fizzie maybe I misread but maybe it's a Newton method
22:57:38 <nakilon> of finding where two lines intersect
22:58:17 <nakilon> it splits in half, and it's basically that "guess the number" game
23:00:31 <nakilon> or maybe I don't have a clue
23:02:35 <rain1> it is the bisection method, but newton applied the derivative to make it faster
23:09:09 -!- Lykaina has joined.
23:09:45 -!- NeverBorn has joined.
23:10:08 <Lykaina> how esoteric is this: http://thor.lesidhetree.com/sara/echidna/arduino/helloworld.txt
23:10:54 <Lykaina> reference: http://thor.lesidhetree.com/sara/echidna/arduino/cmdop6a-arduino.pdf
23:11:49 <imode> looks like intel hex stuff.
23:14:28 <kmc> looks like a little bytecode for arduino?
23:16:30 <Lykaina> it doesn't require an external parser or a hex editor, unlike earlier attempts
23:17:20 <kmc> I started playing with CircuitPython
23:17:38 <Lykaina> what you see in the txt file is what is on the sd card
23:17:48 <kmc> it's a neat concept, you can edit the .py file right on your embedded target (which appears as a mass storage device) and it runs the new code immediately
23:17:52 <kmc> so there's no host-side dev tools needed
23:18:19 <kmc> but the one circuitpython device I own does some kind of crazy things, it seems to try to be a keyboard and messes with my keyboard layout, among other issues
23:18:22 <imode> so do you have an interpreter running on the arduino.
23:18:44 <kmc> so I probably need to tweak the default firmware/script before I have some pleasing experience with CircuitPython
23:18:48 * imode needs to get an ardunio so they have an AVR target.
23:19:28 <Lykaina> 39 commands are recognized at the moment
23:19:30 <imode> kmc: huh, this looks interesting... it doesn't run Python directly on the MCU, right?
23:19:40 <imode> it just emits code for it.
23:19:43 <kmc> no it does
23:19:55 <imode> that's gotta be limiting.
23:19:56 <kmc> they have some stripped down Python interpreter that runs on ARM Cortex-M and maybe some other CPUs
23:20:01 <kmc> not sure if there's any for AVR
23:20:11 <kmc> yes, it is limiting
23:21:10 <kmc> it's made to be a really easy way to get started with MCU programming
23:21:17 -!- rain1 has quit (Quit: WeeChat 2.9).
23:21:22 <kmc> so in that respect I'm not the target audience, but i thought it'd be fun to play with anyway
23:22:32 <Lykaina> my echidna languages are pretty useless
23:22:42 <kmc> Cortex-M MCUs are about as cheap as AVR these days
23:22:52 <imode> I need an AVR target for Feather.
23:24:43 <kmc> most of the embedded stuff i've done lately has been ESP8266
23:24:53 <kmc> but it's quite limited on the hardware peripherals side
23:24:58 <kmc> I might get into ESP32
23:25:08 <kmc> there's a new variant of ESP32 which has a RISC-V core
23:25:13 <kmc> could probably run Rust on that
23:25:33 <nakilon> there should be a brainfuck interpreter for arduino robot
23:25:37 <Lykaina> is there a subset of c i could write an arduino interpreter for?
23:25:46 <nakilon> that would go left and right on the line
23:25:52 <kmc> nakilon: :D
23:25:56 <imode> Lykaina: go further and write a forth.
23:25:58 <nakilon> dropping stuff onto drawn cells on it
23:26:05 <kmc> (the previous ESP's use Xtensa architecture which doesn't have a mature / working LLVM target)
23:26:26 <imode> you didn't know C either.
23:26:43 <kmc> Lykaina: C isn't usually interpreted, but it's not to say nobody's ever written an interpreter for it
23:26:56 <kmc> from a quick search https://github.com/jpoirier/picoc might be of interest
23:27:03 <nakilon> if you make arduino robot turn in place you can make a befunge interpreter
23:27:22 <nakilon> need a camera reading the cells from the ground
23:27:38 <kmc> for that matter you could probably fit a minimal C *compiler* and dynamic loader on AVR
23:27:45 <kmc> I men, it was originally developed for PDP-11
23:27:58 <imode> people often forget that.
23:28:03 <imode> for better or worse.
23:29:21 <imode> also re: brainfuck, I implemented a BF DSL in my language. line 365 and 374. https://hastebin.com/kehapukuxa.txt
23:29:23 <kmc> one issue, AVR is a Harvard architecture, you can't execute code directly from RAM
23:29:37 <kmc> but there are special instructions you can use to write to flash
23:29:48 <kmc> which are used for example by the Arduino bootloader
23:30:04 <nakilon> so there are 55 commands in rasel, including 35 that encode numbers
23:30:13 <nakilon> it's 4 levels or R + G + B
23:30:58 -!- delta23 has quit (Quit: Leaving).
23:31:37 -!- NeverBorn has quit (Remote host closed the connection).
23:31:58 <Lykaina> what's rasel designed for?
23:32:54 <kmc> I wouldn't choose to write an embedded C interpreter though; I don't really like C syntax and it's harder to parse than it needs to be
23:33:12 <kmc> I don't mind writing C but if I'm implementing a C-like language from scratch and don't need C compatibility then I'd probably choose a simpler syntax
23:33:18 <Lykaina> how easy is it to write a forth interpreter?
23:33:28 <imode> pretty easy. you can write one in a weekend.
23:33:45 <imode> feather is even simpler, but it ain't ready.
23:34:09 <imode> forth is typically used to bootstrap systems that don't have a C compiler yet.
23:34:14 <imode> very easy to bring up in just assembly.
23:37:30 <kmc> other good choices for an embedded interpreted language would be scheme and lua
23:38:04 <kmc> maybe i should port qoppa to AVR some day. that could be amusing
23:38:09 <imode> scheme is always fun. garbage collection, though.
23:38:49 <imode> thaaat's actually I why I want an AVR target. feather (my lang) has no garbage collection. everything is copy on write.
23:38:50 <kmc> I'm not sure how CircuitPython handles garbage collection
23:39:02 <imode> 's all lispy and shit.
23:39:05 <Lykaina> when i write for arduino, i write in arduino's subset of c++
23:39:07 <kmc> refcounted?
23:39:20 <imode> nope. reference chains.
23:39:24 <kmc> what do you mean by Arduino's subset exactly?
23:39:30 <Lykaina> any interpreter has to be written in that
23:39:56 <b_jonas> what character encoding encodes è or maybe é as 0xC8 and ö or maybe ő or something similar as 0x96? I'm trying to figure out in what exact way the encoding of this webpage is mangled
23:40:04 <kmc> I think they use a standard g++ (with some minimal extra preprocessing) and any C++ constructs are supported
23:40:56 <kmc> i've definitely used stuff like templates and lambdas in arduino code
23:41:07 <kmc> even if these are not exactly common in arduino code written by others, they are fully supported
23:41:16 <imode> if you duplicate a giant list, for example, you're just taking a reference to it. all references to a particular thing are tied together as a doubly linked list, allowing us to move and shift stuff around without actually copying.
23:41:28 <kmc> actually there were lambdas in the esp8266 example code I found since it's a pretty convenient way to write small web server callbacks
23:42:30 <kmc> C++ has a lot of features that are considered advanced / high-level but also have no runtime overhead, making them suitable for embedded programming
23:42:47 <kmc> the idea that embedded programming needs to be austere, repetitive C code and free of any elegant, powerful abstractions kind of annoys me
23:42:53 <kmc> but it's the industry standard
23:43:09 <imode> so if you do `[ giant-list-generator ! ] 100 while dup not-zero? do save dup recall end`, which generates a giant list, dups it 100 times, you'll have 100 copies of that thing sitting around in memory unless you try to modify it. and modifying it usually just means adding stuff to it.
23:43:18 <kmc> as for Arduino libraries many of them use C++ features in annoying ways
23:43:24 <kmc> such as rampant unprincipled use of overloading
23:43:38 <kmc> oh if you call the constructor with 2 ints then it's a I2C bus but if you call with 4 ints then it's a SPI bus!!
23:43:43 <kmc> great API, guys
23:43:57 <imode> yeeeeeah.. there's so much room for surprise in that.
23:44:14 <imode> C++ sucks in that regard.
23:46:15 -!- Arcorann_ has joined.