code logs -> 2021 -> Sat, 16 Jan 2021< code.20210115.log - code.20210117.log >
--- Log opened Sat Jan 16 00:00:09 2021
01:26 VirusJTG_ [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [[NS] Quit: Leaving]
01:26 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
01:26 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
02:50 Pink [uid208117@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
03:45 Pink [uid208117@Nightstar-h2b233.irccloud.com] has joined #code
04:08 Degi [Degi@Nightstar-0mdc3l.dyn.telefonica.de] has quit [Ping timeout: 121 seconds]
04:17 Degi [Degi@Nightstar-0t0c6p.pool.telefonica.de] has joined #code
04:32 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code
04:32 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
05:12 abudhabi_ [abudhabi@Nightstar-n1nchq.adsl.tpnet.pl] has joined #code
06:08 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
06:08 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
06:08 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
06:38 celticminstrel [celticminst@Nightstar-n1gkap.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:51 SmithKurosaki [uid215460@Nightstar-ed0oqj.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
07:20 Pink [uid208117@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
07:45 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection reset by peer]
10:28 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
11:04 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has quit [Ping timeout: 121 seconds]
11:28 NSGuest7271 [crystalclaw@Nightstar-12q9ui.xyz] has joined #code
11:42 NSGuest7271 [crystalclaw@Nightstar-12q9ui.xyz] has quit [Ping timeout: 121 seconds]
11:42 john_cephalopoda [john@Nightstar-j5ldli.dip0.t-ipconnect.de] has joined #code
11:42 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code
11:43 mode/#code [+o crystalclaw] by ChanServ
11:43
< john_cephalopoda>
Morning
11:46 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has quit [Operation timed out]
11:47 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code
11:48 mode/#code [+o crystalclaw] by ChanServ
11:58 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has quit [Operation timed out]
11:59 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code
11:59 mode/#code [+o crystalclaw] by ChanServ
12:01 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has quit [Operation timed out]
12:01 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code
12:01 mode/#code [+o crystalclaw] by ChanServ
12:39 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
12:39 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
13:03 SmithKurosaki [uid215460@Nightstar-ed0oqj.irccloud.com] has joined #code
13:11 Kindamoody is now known as Kindamoody|afk
13:39 john_cephalopoda [john@Nightstar-j5ldli.dip0.t-ipconnect.de] has quit [Connection reset by peer]
13:40 Pink [uid208117@Nightstar-h2b233.irccloud.com] has joined #code
13:41 john_cephalopoda [john@Nightstar-j5ldli.dip0.t-ipconnect.de] has joined #code
14:52 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:52 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:32 abudhabi [abudhabi@Nightstar-pqirga.adsl.tpnet.pl] has joined #code
15:35 abudhabi_ [abudhabi@Nightstar-n1nchq.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
15:38 bluefoxx [fuzzylombax@Nightstar-gmbj85.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
16:42 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
16:43 Kindamoody|afk is now known as Kindamoody
17:00 Pink [uid208117@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
17:24 livacious [kvirc@Nightstar-u17.29g.140.185.IP] has joined #code
17:24
< livacious>
https://twitter.com/psaintlaurent0/status/1329514173387190280 LOL this guy has been live tweeting his family being extorted for months. He even got hit with an electronic weapon and live tweeted it. The police and the FBI haven't even spoken to him, this is happening in America right now!
17:25 livacious was kicked from #code by gnolam [Off you go.]
17:41
< john_cephalopoda>
I like programming languages. There are so many and they all got their interesting paradigms and features.
17:43
< john_cephalopoda>
Using Forth for fun and C at work (embedded systems).
17:44
<@gnolam>
"Forth for fun" is not a phrase you hear often.
17:48
< john_cephalopoda>
It's fun to write software in it. It is simple but can be extended to a huge extent.
17:50
< john_cephalopoda>
Only data structures can be a bit of a hassle. Sometimes I would just like to have a big C-style struct and easy access to its members without having to define a few dozen words.
17:53
< john_cephalopoda>
I am mostly coding in the RETRO Forth dialect, which is running on top of a process virtual machine and has many words for string manipulation built-in.
17:56
< john_cephalopoda>
I like checking out new languages though. Seeing new paradigms is fun and helps to look at programming problems from completely different perspectives. I recently tried Scheme/Racket, which is pretty neat.
17:57
<@gnolam>
The best exercise in all my computer science courses was one where you implemented FORTH for the 68k.
17:57
<@gnolam>
It had a full page of backstory!
17:57
<@gnolam>
It was like a LARP in a computer lab.
17:59
<@gnolam>
(It was about decrypting a received encrypted message, by building a FORTH compiler.)
17:59 macdjord [macdjord@Nightstar-re5.7if.45.45.IP] has joined #code
17:59 mode/#code [+o macdjord] by ChanServ
17:59
< john_cephalopoda>
Oh, that sounds so cool!
18:01 macdjord|slep [macdjord@Nightstar-re5.7if.45.45.IP] has quit [Ping timeout: 121 seconds]
18:01 mac [macdjord@Nightstar-re5.7if.45.45.IP] has joined #code
18:01 mode/#code [+o mac] by ChanServ
18:02 celticminstrel [celticminst@Nightstar-n1gkap.dsl.bell.ca] has joined #code
18:02 mode/#code [+o celticminstrel] by ChanServ
18:03
< john_cephalopoda>
I haven't yet written my own Forth. I still find it hard to wrap my head around the interpreter and low-level architecture of Forth.
18:03 macdjord [macdjord@Nightstar-re5.7if.45.45.IP] has quit [Ping timeout: 121 seconds]
18:03
< john_cephalopoda>
I am writing an x86 assembler as an extension of (RETRO) Forth right now. It can output multiboot ELF executable that run on bare x86 hardware :D
18:20
< john_cephalopoda>
Here is a bootable iso that will print a mandelbrot set: https://cuttle.space/tmp/image.iso
18:21
<&ToxicFrog>
I wrote a forth for AVR, but the Harvard architecture means it's quite difficult to write a proper compiler for it, so it ended up being mostly interpreted with an option for AOT compilation on the host machine
18:21
< john_cephalopoda>
And here's the kernel without the syslinux bootloader: https://cuttle.space/tmp/kernel-x86
18:22
< john_cephalopoda>
You can run the iso with "qemu-system-x86_64 -cdrom image.iso" and the kernel with "qemu-system-x86_64 -kernel kernel-x86".
18:28
<&ToxicFrog>
But that in turn greatly limits how you can extend it on-chip, since you can't write new words that use asm :/
18:33
< john_cephalopoda>
Right, strict separation of data and executable code.
18:34
< Emmy>
separation of church and data?
18:35
<@celticminstrel>
What is Forth exactly…?
18:43
< john_cephalopoda>
A family of stack-oriented programming languages. It's commonly written in Reverse Polish notation.
18:43 catalyst_ [catalyst@Nightstar-qtgq1p.dab.02.net] has joined #code
18:45
< john_cephalopoda>
"3 4 +" puts 3 on the stack, puts 4 on the stack, then adds the top two stack elements. So you can represent the formula "(3+4)*5" as "3 4 + 5 *". Put 3 and 4 onto the stack, add top two stack elements. Stack contains 7 now. Put 5 onto the stack so 7 and 5 are on the stack. Then multiply the top two stack elements and get 35 as top stack element.
18:46 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
18:46
< john_cephalopoda>
I'm not great at explaining, there is a very popular (e-)book teaching the basics though. Can be downloaded for free at https://www.forth.com/starting-forth/
18:46
<&ToxicFrog>
john_cephalopoda: yeah, which is fine if you're using a bytecode interpreter, but (a) it means all new words have to be bytecode, which means no new primitives, and (b) each new word eats RAM and that's an issue when you have 4K of ROM and like 256b of RAM
18:48
<&ToxicFrog>
celticminstrel: in addition to john_cephalopoda's explanation, the main thing that differentiates forth from other stack-based postfix languages like Postscript is that is commonly used on microcontrollers and for other "low-level" applications, and has a culture of transparency and extensibility that make it easy to customize a forth for the specific platform and program you're
18:48
<&ToxicFrog>
writing (and dig into its internals as needed)
18:50
< john_cephalopoda>
I haven't really worked with AVR before. Talked to somebody briefly, who wrote a Forth for it. Apparently there's some very convoluted way to write to ROM. I wonder if that could be used to keep parts of the code externally and swap those in on demand...
18:51
<@celticminstrel>
I see.
18:52
< john_cephalopoda>
Maybe I just misunderstood it though and there is no way to write to ROM from the µC itself.
19:21 catalyst_ is now known as catalyst
19:31 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
19:32 catalyst [catalyst@Nightstar-qtgq1p.dab.02.net] has quit [Ping timeout: 121 seconds]
19:33
< john_cephalopoda>
Pretty cool AI thing that can generate spoken audio with voices of various movie and cartoon characters: https://15.ai/
19:41 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
19:41 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection reset by peer]
20:30 macdjord|slep [macdjord@Nightstar-re5.7if.45.45.IP] has joined #code
20:30 mode/#code [+o macdjord|slep] by ChanServ
20:32 mac [macdjord@Nightstar-re5.7if.45.45.IP] has quit [Operation timed out]
20:35 mac [macdjord@Nightstar-re5.7if.45.45.IP] has joined #code
20:35 mode/#code [+o mac] by ChanServ
20:38 macdjord|slep [macdjord@Nightstar-re5.7if.45.45.IP] has quit [Ping timeout: 121 seconds]
20:48
<&ToxicFrog>
You can indeed read and write ROM at runtime, but it's complicated, tricky, and very, very slow
20:52
< john_cephalopoda>
I guess it would slow down compilation.
20:53
< john_cephalopoda>
But once the word is written, execution can go on with regular speeds.
21:21
<&McMartin>
gnolam: I have definitely also heard "Forth for fun" and my opinions about this are complex.
21:22
<&McMartin>
Also computer lab LARPs are fun and have a long and glorious history
21:22
<&McMartin>
Advent of Code probably counts, tbh, but the UK in particular had a bunch of "youth adventure stories" where the action stops at various points for you to use your BBC Micro to write programs to solve clues that advance the plot etc
21:24
<&McMartin>
TF is quite right regarding Forth's strong history in embedded devices -- IIRC it was invented in the first place to control telescopes -- and the part that makes this fascinating is that the cutlure that surrounds it matches Lisp culture to about five decimal places
21:24
<&McMartin>
including the bong-ripping "learning to write idiomatic code in this language was a genuine mystical/religious experience" stuff
21:25
<&McMartin>
... despite the two languages existing at opposite levels of abstraction.
21:25 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [The TLS connection was non-properly terminated.]
21:25
<&McMartin>
There's something about higher order functions that Does Things to people
21:26
<&McMartin>
(or possibly hygenic macros)
21:26
<&McMartin>
Lisp and Forth do both share the kind of space where you have a problem and you have a language, so you use that language to build the language that makes it way easier to solve your problem, and then use it to do so
21:36
<&ToxicFrog>
I think it's probably the macros (combined with the minimalistic syntax that makes it easy to use those macros to implement constructs that look like language builtins, although there is no intrinsic reason you can't do that in other languages, it's just hairier and people hardly ever both implementing it as a result)
21:36
<&ToxicFrog>
Because there are lots of relatively mainstream languages with HOFs that don't provoke that reaction, like python and scala
21:54
< john_cephalopoda>
I like LISP and racket/scheme. Library integration is a bit lacking though imo.
21:55
< john_cephalopoda>
Same for most Forth dialects. Printing to terminal and doing calculations work great, but it all kinda falls apart when you want to do 3D graphics or other complex stuff that requires a library.
21:58
<&McMartin>
Yeah
21:58
<&McMartin>
Though when the bindings are there for a purpose
21:58
<&McMartin>
Like, say, game implementation in extremely tight constraints
21:58
<&McMartin>
Forth did extremely well.
21:59
<&McMartin>
Starflight was written in it, and IIRC the first Mac programs to be written on a Mac instead of an a Lisa were also written in it because it was the only development environment the earliest Macs could self-host
22:00
< john_cephalopoda>
I tried graphics programming in Forth and it isn't much fun.
22:00
< john_cephalopoda>
As soon as you got more than 3-4 parameters on stack, it becomes hard to handle.
22:05
< john_cephalopoda>
There are OpenGL bindings for GNU's gforth though. http://www.complang.tuwien.ac.at/anton/lvas/stack-abgaben/07w/glforth/
22:07 Pink [uid208117@Nightstar-h2b233.irccloud.com] has joined #code
22:24
< john_cephalopoda>
Rocket launch: https://www.youtube.com/watch?v=ELHOXi2t3lk
22:24
< john_cephalopoda>
Well, engine test.
22:24
< john_cephalopoda>
Not actual launch. Still fire everywhere, so it's just as good.
22:26
<&McMartin>
I've been told by Forthers that if you're thinking too hard about the stack that means you aren't defining enough words
22:34
< john_cephalopoda>
Every word takes memory :þ
22:35
<&McMartin>
If you're using OpenGL you are not that heavily constrained =P
22:37
<&McMartin>
But yeah, Forth is something I consider an "obvious gap" in my skills
22:38
<~Vornicus>
i never used forth but I have hand-written art assets in postscript
22:38
< john_cephalopoda>
I'm probably thinking about performance and memory size too much. Rewriting stuff that works quite ok because it could be a bit more performant, then it turns out it isn't really much more performant.
22:40
<&McMartin>
Always measure first, yeah
22:40
<~Vornicus>
don't / don't yet / profile first
22:40
<&McMartin>
There's a caveat on that though
22:40
<&McMartin>
Which is that Rule Zero still applies
22:41
<&McMartin>
Rule Zero being the same Rule Zero as everywhere else: "don't be an asshole"
22:41
<&McMartin>
don't / don't yet in particular assumes that you weren't being completely heedless, profligate, or perverse during initial development
22:41
<&McMartin>
So that even with "zero" effort you're going to be orders of magnitude faster than someone less experience
22:41
<&McMartin>
Knowing which algorithms you should have been using in the first place turns out to matter a lot!
22:42
<&McMartin>
Huh, looks like I uninstalled gforth at some point
22:43
< john_cephalopoda>
Simplicity is also an important thing. I am building that x86 assembler. First version was fast and simple but used a little more memory. My second iteration is slower to load because the code is more complex and takes longer to compile but it saves memory.
22:46 VirusJTG_ [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
22:47 * McMartin nods
22:47
<&McMartin>
Doing anything with the assembler or is the assembler the goal?
22:49 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Ping timeout: 121 seconds]
22:57
< john_cephalopoda>
The assembler is written in the RETRO Forth dialect, which runs in a process virtual machine. I am writing an implementation of the process virtual machine in assembly so I can run it on x86 hardware directly.
22:59
< john_cephalopoda>
It actually runs already. The iso I posted earlier is a RETRO program running in the process virual machine written in my assembly.
23:06
< john_cephalopoda>
https://www.theolognion.com/projector-connectivity-proved-to-be-np-hard/ :D
23:17 abudhabi [abudhabi@Nightstar-pqirga.adsl.tpnet.pl] has quit [Operation timed out]
23:27
<&McMartin>
Yeah, I guess my observation here is that in many ways x86 programming is not retro because it may be used to produce things like Windows 10 executables :)
23:36
< john_cephalopoda>
"RETRO" is the name of the Forth dialect I'm using. http://retroforth.org/
23:38
< john_cephalopoda>
I can't wait until RISC-V computers are readily available. Looks like a very nice architecture to code on.
23:41 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
23:44
<&McMartin>
Oh, I see
23:45
<&McMartin>
Interesting
23:48
< john_cephalopoda>
Hmm, I'd like to code some useful software but haven't really got any ideas for what to code. The assembler is not very useful and I lose motivation to work on it frequently.
23:53
<&McMartin>
Yeah, I'm a little interested in this question because back in 2001 or so I taught myself Python by writing an assembler, but it was because I was unhappy with the alternatives I had to hand
23:53 Kindamoody is now known as Kindamoody[zZz]
23:53
<&McMartin>
Had I actually known about ACME at the time I would probably never have written Ophis
23:54
<&McMartin>
(I was trying to do NESdev and the tooling for that was just not there, and the 6502 devkits all were interested in assuming things that did not apply to iNES files)
23:55
<&McMartin>
If you just want drills, stuff like Advent of Code is a way to write a bunch of small programs that do small things
23:55
<&McMartin>
My hobby projects lately have been adapting medium-sized projects from old magazines and such
23:57
<&McMartin>
Though "lately" here apparently means "last April".
23:57
<&McMartin>
https://bumbershootsoft.wordpress.com/2020/04/17/simulated-evolution/
--- Log closed Sun Jan 17 00:00:10 2021
code logs -> 2021 -> Sat, 16 Jan 2021< code.20210115.log - code.20210117.log >

[ Latest log file ]