mark4 changed the topic of #forth to: Forth Programming | do drop >in | logged by clog at http://bit.ly/91toWN backup at http://forthworks.com/forth/irc-logs/ | If you have two (or more) stacks and speak RPN then you're welcome here! | https://github.com/mark4th
mirrorbird has joined #forth
xek_ has joined #forth
xek has quit [Ping timeout: 264 seconds]
<lispmacs> I was thinking about writing an irc bot in forth as an exercise. But what approach should I take as far as establishing the network connection?
<lispmacs> like, connect forth stdin / stdout to another program...?
mirrorbird has quit [Quit: Leaving]
Keshl has joined #forth
<crc> either raw sockets, or use with something like ii
<crc> https://tools.suckless.org/ii/ will handle the connection an let you use fifo's to interact with the irc channel
<crc> For sockets, it would depend on your forth. In mine, I provide a subset of the berkley socket api which is enough for my occasional needs (including this very task)
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
_whitelogger has joined #forth
gravicappa has joined #forth
<joe9> lispmacs, just use plan9. it gets simpler to create one in a shell script.
<joe9> or, forth and standard fd's.
spoofer has quit [Ping timeout: 264 seconds]
hosewiejacke has joined #forth
<crc> joe9: how well does plan9 work in a text-only environment? eg, without rio?
spoofer has joined #forth
sts-q has quit [Ping timeout: 264 seconds]
sts-q has joined #forth
spoofer has quit [Ping timeout: 264 seconds]
spoofer has joined #forth
hosewiejacke has quit [Ping timeout: 245 seconds]
spoofer has quit [Ping timeout: 246 seconds]
spoofer has joined #forth
hosewiejacke has joined #forth
f-a has joined #forth
astrid has quit [Ping timeout: 240 seconds]
astrid has joined #forth
f-a has quit [Read error: Connection reset by peer]
f-a has joined #forth
hosewiejacke has quit [Ping timeout: 245 seconds]
f-a has quit [Quit: leaving]
f-a has joined #forth
f-a has quit [Quit: leaving]
jedb_ has joined #forth
jedb__ has quit [Ping timeout: 264 seconds]
jedb__ has joined #forth
jedb_ has quit [Ping timeout: 264 seconds]
xek_ is now known as xek
andrei-n has joined #forth
hosewiejacke has joined #forth
Keshl has quit [Quit: Konversation terminated!]
hosewiejacke has quit [Ping timeout: 245 seconds]
mirrorbird has joined #forth
<neuro_sys> lispmacs: My unrelated suggestion: build a higher level string vocabulary, because the built-in words alone will be difficult to work with.
<neuro_sys> That being said, it sounds like a good exercise, I might try that too.
mirrorbird has quit [Quit: Leaving]
tech_exorcist has joined #forth
tech_exorcist has quit [Max SendQ exceeded]
hosewiejacke has joined #forth
mirrorbird has joined #forth
tech_exorcist has joined #forth
andrei-n has quit [Quit: Leaving]
elioat has joined #forth
f-a has joined #forth
dave0 has quit [Quit: dave's not here]
hosewiejacke has quit [Ping timeout: 245 seconds]
hosewiejacke has joined #forth
inode has quit [Quit: ]
inode has joined #forth
elioat has quit [Quit: elioat]
elioat has joined #forth
f-a has quit [Quit: leaving]
spoofer has quit [Quit: Lost terminal]
elioat has quit [Quit: elioat]
f-a has joined #forth
hosewiejacke has quit [Ping timeout: 245 seconds]
tech_exorcist has quit [Quit: tech_exorcist]
tech_exorcist has joined #forth
tech_exorcist has quit [Max SendQ exceeded]
tech_exorcist has joined #forth
elioat has joined #forth
gravicappa has quit [Ping timeout: 260 seconds]
gravicappa has joined #forth
hosewiejacke has joined #forth
f-a has quit [Ping timeout: 264 seconds]
hosewiejacke has quit [Ping timeout: 245 seconds]
f-a has joined #forth
hosewiejacke has joined #forth
hosewiejacke has quit [Remote host closed the connection]
tech_exorcist has quit [Remote host closed the connection]
tech_exorcist has joined #forth
mirrorbird has quit [Quit: Leaving]
f-a has quit [Ping timeout: 276 seconds]
f-a has joined #forth
<nihilazo> hi, is there any forth for AVR that can interface with existing arduino stuff? I only know enforth which is (apparently) very unfinished, amforth which is a complete replacement for anything arduino, and arduino-FVM which seems weird
<mark4> nihilazo: i would not try to use arduino compiled thigns in forth
<mark4> use amforth and implement those things in forth
<nihilazo> but that would require reimplementing a lot of things
<mark4> so instad of having [f][ccccccccccccccccccccccccccccccccccccccc] where F is the forth based stuff and C is the c based stuff
<mark4> yup and in forth that is trivial
<nihilazo> unless amforth has USB and i2c and such
<mark4> not quick but trivial
<nihilazo> yeah I don't want to have to reimplement tons of stuff
<mark4> actually not c in this case but c++ which in all cases is ABSOLUTELY mutually exclusing with embedded
<mark4> no exceptions
<nihilazo> idk how to implement USB HID from scratch! lol
<inode> i guess you have to determine whether it's going to be easier to implement HID or FFI (plus any linkage trickery required) then
<mark4> i changed the x64 license to mit, im currently going through every change i have in my local x4 clone and either back tracking them or adding them for commit
<mark4> there are a lot of files listed in git status that are marked as modified that have no differences shown by git diff (white space bs?)
<mark4> so im reverting those. its a horrendous mess right now
<mark4> lots of changes i made over 2 years ago and no idea wtf i was doing lol
<mark4> some of them are related to the TUI in there that im going to be rewriting anyway so meh
<mark4> but i have to keep doing git diff foo/bar/bam/fud.f followed by git checkout foo/bar/bam.f over and over and over and over.. . . . ...
<lispmacs> nihilazo: I don't know of an option other than arduino-fvm. I abandoned it for flashforth
Rakko has joined #forth
astrid has quit [Ping timeout: 272 seconds]
* nihilazo wants to not be working with arduino and instead with a better platform, but is working with existing arduino-based hardware (atmega32u4)
astrid has joined #forth
<mark4> i like the 32u4
<mark4> i put my (now abandoned work) 32u4 forth kernel in the boot sector
<lispmacs> just keep in mind that Arduino is a board platform, whereas the chips are Atmel AVR
<mark4> really for a 32u4 you need to have a tethered forth
<nihilazo> well, the 32u4 is fine
<nihilazo> but the arduino pro micro is terrible
<nihilazo> it's the main board that custom keyboard people use and they're so bad, the USB connectors break all the time, the bootloader is half broken
<inode> nihilazo: instead of trying to call the C functions that implement HID, considered using one of those implementations as a reference to translate the logic (minus calling convention stuff) to AVR assembly and then implementing CODE words instead?
<nihilazo> AVR assembly also scares me
<nihilazo> lol
<mark4> what i would have done :)
<mark4> avr assembly is actually really really easy
<nihilazo> where is AVR relative to 6502
<nihilazo> that's the only assembly I've ever remotely been able to grok and even then I'm not great
<inode> i think it's closer to 8051 isn't it?
<mark4> much simpler
<mark4> to code i mean
<mark4> avr asm is easier than both imho
<mark4> and i used to most 6502 opcodes by heart and i hve written my own avr and 8051 assemblers
<nihilazo> implementing USB in AVR asm would certainly be...interesting
<nihilazo> as in, probably wayy too much learning for me
<nihilazo> tbh I should probably stick to using whatever language has the most exising libraries because I'm dumb
<nihilazo> but I like the idea of using forth
<mark4> nihilazo: no actually, its not that difficult
<inode> seems like the popular choice is, https://github.com/obdev/v-usb with the meat of the driver @ https://github.com/obdev/v-usb/blob/master/usbdrv/usbdrvasm.S
<nihilazo> you underestimate how dumb I am lol mark4
<nihilazo> LUFA also seems like a popular option for USB on AVRs
<nihilazo> but idk how any of this works with forth
<mark4> you over estimate how smart i am lol
<nihilazo> I doubt it
<nihilazo> I mean, you're smarter than me for sure at least in terms of technical knowledge
<mark4> knowledge does not imply intelligence
<nihilazo> smart and dumb are useless words really, because people are good at different things
<nihilazo> but in terms of technical ability and knowledge, I am not knowledgable nor really skilled, I hack out bad software and it mostly kinda works
<f-a> if it works, it is good software
<f-a> marginally good
<f-a> that can become asymptotically good
<nihilazo> I guess? idk
<nihilazo> I doubt a USB stack I wrote would ever work though
<mark4> thats why we debug code :)
<nihilazo> true
<nihilazo> would be a larger project than I was hoping for this to be if I had to do more stuff myself. But it would be interesting
<nihilazo> maybe I should do it for the sake of all the things I'd learn
<nihilazo> and then I can always fall back on the existing firmware if mine sucks
<mark4> we do these things, not because they are easy
<nihilazo> for me it's "not because they are easy, but because on a whim once i decided to do it and now I'm trapped" lol
<mark4> well... decide again and trap yourself inside forth :)
gravicappa has quit [Ping timeout: 246 seconds]
<nihilazo> it's not a bad place to be tbh
<nihilazo> maybe USB is a bad place to be, dunno
<mark4> 1) download the USB spec.
<mark4> 2) spend a lot of tyine crying over "whiskey tango foxtrot!"
<mark4> the usb standard is NOT easy to implement. its very difficult for coders but it was not supposed to be easy for anyone except users
<mark4> imho that was a design flaw
<nihilazo> 3) learn a bunch but then eventually abandon it and go back to using prebuilt firmwares
<mark4> there is no real need for USB which is just a freeking serial interface to be THAT freeking complex
<nihilazo> custom keyboard folks smh, always using prebuilt firmwares
<nihilazo> they customise the hardware as much as they want but then literally only ever use one, bad, firmware
<nihilazo> (except in rare cases)
f-a has quit [Ping timeout: 264 seconds]
f-a has joined #forth
<inode> nihilazo: what's your end goal for a project like that? keyboard firmware for personal use?
<nihilazo> yeah
<nihilazo> keyboard firmware for personal use, that can maybe do some crap that is niche as hell for a normal keyboard firmware (like "hardware" (as in, in the keyboard not the PC) support for a one-handed chording layout)
<inode> if USB is intimidating and you don't really care much about which bus you send your input over, then you could add a bit of extra hardware to lessen the software burden - ie. use UART, adjust I/O levels for RS-232 (or 5V TTL with connection to a serial-to-USB adapter) to host
<nihilazo> well I'm building this for an existing keyboard
<nihilazo> is the thing
<nihilazo> and I don't really have much ability to make hardware modifications
<nihilazo> (I built it, but with PCBs etc from a kit)
<inode> it's an AVR based keyboard though?
elioat has quit [Quit: elioat]
<nihilazo> yeah, it's literally got arduino pro micros o it
<nihilazo> https://github.com/foostan/crkbd one of these
<nihilazo> atmega32u4
Rakko has quit [Ping timeout: 246 seconds]
elioat has joined #forth
Rakko has joined #forth
<inode> nice form
<nihilazo> it's a really nice keyboard, other than running qmk which is a firmware I'm not a fan of
<nihilazo> I mean, qmk works but it's a pain to work with
elioat has quit [Quit: elioat]
jess has quit [Remote host closed the connection]
j has joined #forth
j has quit [Quit: K-Lined]
cmtptr has quit [Read error: Connection reset by peer]
cmtptr has joined #forth
Rakko has quit [Ping timeout: 256 seconds]
f-a has quit [Remote host closed the connection]
f-a has joined #forth
Zarutian_HTC has joined #forth
tech_exorcist has quit [Quit: tech_exorcist]
j has joined #forth
j is now known as jess
jedb_ has joined #forth
spoofer has joined #forth
jedb__ has quit [Ping timeout: 276 seconds]