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
really2 has joined #forth
really2 has quit [Remote host closed the connection]
<neto_> is x4 ANSI compliant? I'm writing it in gforth so going over to another ANSI Forth would be the easiest. mark4
mark4 has joined #forth
yyyyyy has joined #forth
<neto_> is x4 ANSI compliant? I'm writing it in gforth so going over to another ANSI Forth would be the easiest. mark4
<mark4> no x4 is not ans compliant if thats what you mean
<neto_> and does x4 provide a way to create bindings for C?
<mark4> im dont have postpone defined
<mark4> i dont have invert defined
<mark4> and a whole bunch of other stuff i disagree with :)
<mark4> actually no no bindings to c but i could add
<neto_> alright that's fine, my project is still in very early stages so porting it should be no biggy
<neto_> ah come on, you call it THE forth for Linux but you don't even have a way to interact with the de facto Linux language?!
<mark4> i treat my forth as the OS and linux as my bios :)
<neto_> are the 64 bit and 32 bit versions compatible? as in will properly written code work for both?
<mark4> adding an FFI for calling C is non trivial
<neto_> ah, taking the Emacs approach I see
<mark4> the 64 bit version has some issues right now
<mark4> no emacs is bloatware lol
<mark4> my entire thing is minute :)
<mark4> even gforth is bloatware imho
<neto_> it's bloatware cuz it treats the OS has a bios and emacs itself as the OS : )
<neto_> yes gforth is p fat but it's convenient
<neto_> has saved my ass a few times with some niche but very well documented extensions to the standard
<mark4> i take the aproach that if its missing from my fort add it, thats the forth way :)
<mark4> oh look, i need a memory manager. i added it
<mark4> wouldnt terminal cursor control be nice? i added it
<neto_> if this text editor project gets serious i'll either make a forth for it or move it to a lighter forth like x4
<neto_> how do you think Emacs got so bloated!
<mark4> on my wouldnt it be nice list is X protocol
<neto_> 30+ years of additions, that's how!
<mark4> it was written in bash script?
<mark4> people used to jokingly say that EMACS stood for eighty megs and constantly swapping
<neto_> how DARE you, bash script is sacred for us unix folks!
<mark4> but it being only 80 megs years ago lol
<mark4> once upon a time there was a forth bulliten board system
<mark4> the ENTIRE system was written in dos batch. literally the entire thing
<neto_> yeah you can tell how old that joke is by the fact its way past the 80 megs weight limit lmao
<mark4> my dad asked them why didnt you write it in forth and they never spoke to him again
<mark4> lol
<neto_> hmm what arch was emacs first implemented in?
<mark4> 68k?
<mark4> z80? :)
<neto_> you'd need one hell of a z80 to run any version of emacs
<neto_> first release was in 1976, god damn
<mark4> wow when i was 21
<mark4> 12
<neto_> you're showing your age, mark4
<mark4> hush u
<neto_> how did you start working in forth btw
<neto_> i'm in the process of finding my first job since i'm graduating soon and I have absolutely no hope of finding a job working with forth sadly
<mark4> my father showed it to me
<mark4> then i got a job in england simply because i knew forth
<mark4> but they hired me temp as a test to see if i knew my shit
<mark4> then after 8 months they offered me 14k a year
<mark4> i told them where to stick it
<mark4> make that 80k and we can talk
<mark4> came back to the U.S. and literally MADE UP my resume lol
<mark4> many moons ago
<neto_> what kind of area did you find work in? space related applications or just general embedded systems?
<mark4> embedded is all i do
<mark4> any
<neto_> "James Gosling, who would later invent NeWS and the Java programming language, wrote Gosling Emacs in 1981" A history of creating bloat
<mark4> worked on military applications, medical, light and heavy industrial
<neto_> yeah I'm finishing my degree in mechatronics/electrical engineering and hoping to find a job in embedded programming
<neto_> tho it seems really hard to find a junior position in embedded programming
<neto_> and they, junior or not, are all in C ofc
<neto_> hopefully i'll be able to find something in Forth later on
<mark4> mechatronics would be freeking awesome lol
<mark4> not always
<mark4> start doing contract work
<mark4> invent your resume :)
<mark4> i had the advantage that i put all of my non existent jobs in england lol
<neto_> do they let you do contract work without any experience? lmao
<mark4> i made up experience lol
<neto_> what did you make up for your resume lmao
<mark4> lots of jobs i never did :)
<mark4> every time i completed a contract that contract when to the top of my resume and bs dropped off the bottom
<neto_> I have a lot of projects in my resume so I HOPE I wouldn't have to lie to get a junior position
really2 has joined #forth
really2 has quit [Remote host closed the connection]
<neto_> mark4: are companies still developing new forth systems? I see absolutely nothing for forth positions here in Europe
<neto_> or are you just maintaining old systems now a days?
<mark4> only way i would know is if i got a job at forth inc. almost none of my jobs throughout my career have been forth
<mark4> there have been some tho
yyyyyy has quit [Ping timeout: 276 seconds]
<neto_> yeah, what a shame. Hopefully I'll get to a point where I can suggest forth during the design process for a system
<mark4> :)
<neto_> what do you mainly work in then, embedded C?
<mark4> dont suggest it, implement it in parallel in secret
<mark4> ya c
really21 has joined #forth
<neto_> ahah, what was that quote, "any sufficiently complex program will inevitably implement a lisp?"
<neto_> something like that, not sure if it was lisp
<mark4> isnt that what emacs is actually written in? :)
<neto_> but maybe you could say the same about complex embedded systems and forth
<neto_> indeed it is, EMACS lisp
<mark4> guy that invented lisp was in uni with CM
<mark4> cm was originally a lisper
<neto_> "any sufficiently complex embedded system will inevitably implement a Forth, wether they know it or not"
<neto_> Paul Graham?
<mark4> or "they just wont know it till its too late }:)"
<neto_> indeed : )
<neto_> looks like we will be getting our forth either way!
<neto_> mark4: speaking of a forth OS, collapseOS might interest you
<neto_> "Winter is coming and Collapse OS aims to soften the blow. It is a Forth (why Forth?) operating system and a collection of tools and documentation with a single purpose: preserve the ability to program microcontrollers through civilizational collapse."
<mark4> oh i cant view that right now my web browser wont launch lol
<mark4> i think i have a gtk problem
<neto_> this dude has his priorities straight
<mark4> what does that os run on?
<neto_> what WON'T it run on!
<neto_> Self assembles on tight ressources. Known to self assemble on:
<neto_> A Sega Master System with a keyboard adapter, a SD card adapter and dual EEPROM socket.
<neto_> A TRS-80 Model 4P with floppies.
<neto_> A RC2014 with a SD card adapter.
<mark4> no raspberry pi? :)
<mark4> or c64 meh
<neto_> "Can assemble Z80, AVR, 8086 and 6809 binaries."
<mark4> i wrote an avr assembler in forth
<neto_> is it a risc?
<neto_> how many lines was your assembler?
f-a has joined #forth
<mark4> erm if i can find it ill look lol
<neto_> just give me a ball park answer, i'm setting up a joke
<mark4> 1146 lines
<mark4> locate to the rescue lol
<neto_> that's BLOATED
<neto_> I wrote an assembler in one line:
<neto_> : subleq, ( A B C --) .$ | swap rot | 3 0 DO dq LOOP | cr ;
<neto_> it IS for a one instruction machine, so there is that
<mark4> mine works with every single avr chip there is as long as you create a personality for it :)
<mark4> i only ever made one for the 32u4 tho
<neto_> ah that's where you went wrong my friend, no subleq chips exist, so I only have to deal with my virtual machine, no nasty reality to get in the way
<neto_> if I learnt anything from Chuck Moore is to design the software and hardware together to simplify the system
<neto_> I found reality too bloated to I went for a virtual machine B-)
<neto_> so*
<mark4> lol
<neto_> jk, I created that "assembler" for my forth subleq compiler: https://github.com/afonsotrepa/obsFORTHcator
<neto_> it compiles a very simple forth-like language to subleq and outputs that as NASM data
<neto_> then that is run by a subleq virtual machine in 32 or 64 x86
<neto_> I created it for a CTF challenge with the goal of creating an obsfucated binary
Zarutian_HTC has quit [Remote host closed the connection]
<siraben> neto_: yeah Collapse OS is interesting
<siraben> mark4: https://github.com/siraben/zkeme80 is nowhere near there but similar in spirit
<neto_> siraben: got any experience with it?
<siraben> neto_: collapse os?
<neto_> yeah
<neto_> def very impressive project
<siraben> yeah played around with it for a bit but didn't use it
<siraben> the person behind CollapseOS thinks we are headed towards civilizational collapse by 2030
<neto_> ran it in linux?
<siraben> yeah and macOS
<neto_> this has TempleOS vibes
<neto_> I like that
<neto_> Tery created a great programming enviroment with TempleOS
<neto_> ie: images were embedded directly in files
<neto_> the shell was a JIT compiler of his version of C
<neto_> obv it was all written in HolyC, his version of C
<neto_> 640x480 was the only supported format
<neto_> 256 colors I believe?
<neto_> just really great stuff
<neto_> I should look more into CollapseOS and the guy behind it
<f-a> he is a sad story
<f-a> but very talented
<neto_> I think his end was tragic, but I'm happy he spent his last years working on what he believed in
<neto_> an inspiration to us all, showing us what we can achieve when we go against the current on our own
<neto_> a few fans have kept developing TempleOS
<neto_> I know some even added TCP/IP support
<f-a> well he obviously had some mental illness
<f-a> apparently — but don’t quote me on that — schizophrenia
<f-a> really a crippling illnes
<neto_> he most certainly did, not that that's a bad thing
<f-a> having schizophrenia?
<neto_> yes
<f-a> well it was not is fault but it is a bad thing, I feel, no?
<neto_> he seemed freer than a normal person will ever be
<neto_> and he spent his last years working on the his love project
<neto_> and had many genuine fans by the end
<neto_> I don't agree with many of his views, but I appreciate his intellectual freedom that you won't find in any "normal" person
joe9 has quit [Quit: joe9]
joe9 has joined #forth
neto_ has quit [Quit: Lost terminal]
dave0 has joined #forth
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
dave0 has quit [Quit: dave's not here]
<tabemann> the thing about CollapseOS is that it assumes we'll all be using Z80's after the collapse
<siraben> sounds like a nightmare scenario if something causes all the chip fabs to become useless
<f-a> I suspect knowing some basic calculus and/or a slide rule will be more useful than anything like that
<tabemann> yeah
<f-a> but hey it is a hobby project and you can learn a lot from it
* tabemann 's hobby project is a forth based OS for the cortex-m, and he's learned a lot from it
<tabemann> well, cortex-m4 or cortex-m7
<f-a> I have read somewhere
<f-a> that the state/universe preppers prepare for
<f-a> is suspiciously similar to the one they lived in their childhool
<f-a> at least technology wise
<f-a> which made me smile
<tabemann> interesting
<f-a> well if you think about it, it is ture
<f-a> *tue
<f-a> gah
<f-a> true!
<siraben> Freud moment? (something something longing for childhood)
<f-a> we kind of reenact our childhood fantasies, sometimes with more expensive toys
<f-a> yeah siraben , exactly
<siraben> but presumably the world one lives in their childhood is advancing technologically all the time
* tabemann 's childhood fantasy was to write his own OS, and now thanks to cortex-m he has
<f-a> I believe learning forth
<f-a> and using it
<f-a> taught me a lot about machines
<f-a> I had not idea was an adress(sp) was, a byte etc
<f-a> so: omnia in bonum
<mark4> siraben: i cant watch that yet, my gtk is broken or somethng, ill see if a reboot fixes it. firefox wont launch
mark4 has quit [Quit: Leaving]
<tabemann> forth to me is the only non-trivial computing environment that one can program all by oneself and can fully understand without being a superhuman
<siraben> mark4: you could just clone it :)
<f-a> ↑ (@ tabemann )
<f-a> it is so refreshing
<f-a> coming from Haskell
<siraben> for me the same can be said about functional programming
<f-a> when basically you treat the compiler as some kind of magic
* tabemann tried implementing scheme at one point at it was just too complicated
<siraben> ok yeah FP compilation is another set of voodoo altogether, heh
<siraben> but interpretation of functional languages is relatively simple.
* tabemann came from Haskell too
<f-a> I know, I recognise the nicks from a certain channel :P
<siraben> tabemann: which part did you struggle with? and what was the implementation language?
<siraben> I think continuations and hygienic macros are the hardest (for me at least0
<tabemann> siraben: the implementation language was Haskell, and the hard part was macros and shit
<tabemann> whereas doing macro-y things in forth is trivial
<f-a> that is syntax-rules, right?
<siraben> well unhygienic macros is straightforward but syntax-rules yeah tougher
<tabemann> yeah
<f-a> even today
<siraben> tabemann: here's my impl in Haskell https://github.com/siraben/r5rs-denot
<siraben> based on the formal semantics of the R5RS spec
<f-a> I have asked why I cannot use if … then during interpretation
<f-a> but the answer is so easy
<siraben> call/cc works and everything but... no syntax-rules hehe
mark4 has joined #forth
<mark4> nope didnt fix
<mark4> trying to get help in #gentoo
<tabemann> f-a: there's [if]
<f-a> tabemann: yeah
<mark4> everything worked just fine for the first hour
<mark4> /usr/lib64/firefox/firefox: symbol lookup error: /usr/lib64/gtk-3.0/modules/libappmenu-gtk-module.so: undefined symbol: gdk_wayland_display_get_type
<siraben> I like that in formal semantics for imperative languages, stack machines are widely used
<mark4> mark4@ASUS:~$
<mark4> im not even using wayland grrrr
<siraben> it's just easier to reason and work with than register machines, formally.
<siraben> mark4: oof
<f-a> siraben: in that type, do you have a SyntaxCase constructor too?
* f-a should check the code before asking
<siraben> f-a: type of what?
<mark4> siraben: inorite!
* tabemann actually uses [if] ... [then] a lot these days
<f-a> Expr
<siraben> mark4: such breakage doesn't happen on NixOS :P 🙈
<mark4> but does firefox run there at all?
<siraben> mark4: well of course!
<siraben> core scheme being if, set, lambda, const, id
<siraben> Looks like dynlib error to me
<f-a> siraben: thanks, I suspected so
<siraben> tabemann: +1 [if] [then]
<f-a> wonder if one could put scheme into GATDs
<siraben> Yeah for type safety?
<f-a> yeah
<tabemann> siraben: what I did is write a word that tests whether a word is defined or not, and then uses that to either raise an exception (if a word needed isn't defined), or to not compile code (if something has already been compiled)
<siraben> Btw, when I was refactoring the denotational semantics into a monad transformer stack I came up with
<siraben> newtype Scheme m u r s a = Scheme {unScheme :: ReaderT u (StateT s (ContT r m)) a}
<siraben> deriving (Functor, Applicative, Monad, MonadReader u, MonadState s, MonadCont, MonadFail, MonadIO)
<siraben> It's like describing a super duper generalized language with environment, state and continuations.
<siraben> tabemann: Oh I see, to prevent shadowing?
<tabemann> siraben: to make sure dependencies are already compiled, and to prevent recompilation if the code already has been compiled
<siraben> I think I've already shared it here, but tabemann, f-a you might be interested in https://github.com/OriansJ/blynn-compiler
mark4 has quit [Quit: Leaving]
<siraben> It's a self-hosting compiler for a subset of Haskell that has been bootstrapped from a 357 bytes seed
<f-a> super interesting
<siraben> not directly doing anything for the GCC bootstrap yet but it may in the future/serve as a bootstrap for GHC
<siraben> yeah this is the same project that takes that seed and plans to go to GCC via Guile
<tabemann> interesting
<siraben> They have a Forth implementation to but apparently it was a dead end, maybe a true Forther can prove them wrong!
<siraben> I wonder how hard it would be to write a C compiler in Forth.
<f-a> you would have hundreds of blogpost on how pointless the endeavour is
<siraben> would be all talk no action
<siraben> I've only done up to a LL(1) parser generator in Forth, so I guess that's something.
routeveg has quit [Quit: leaving]
mark4 has joined #forth
<mark4> seems that kde plasma with +gtk support has an assinine dependency on wayland
<mark4> recompiling kde-meta with a -gtk use flag fixed everything
<tabemann> back
proteus-guy has quit [Ping timeout: 245 seconds]
<f-a> would that be enough for C siraben ?
* f-a has no idea
<f-a> is parsec ll(1)?
<siraben> f-a: probably. C was designed to be compilable in one pass.
<siraben> Parsec is LL(∞) if you use try, LL(k) otherwise, because parsers can consume unbounded lookahead with try
<f-a> everyone uses try!
<siraben> Let me double check by looking at the parsec paper
<f-a> well everyone uses megaparsec nowadays
<siraben> heh "LL(∞) is a powerful grammar class. Any non-ambiguous context-free grammar can be transformed into an LL(∞) grammar. In practice, there are many languages that require arbitrary lookahead; for example, type signatures in Haskell or declarations in C."
<siraben> Looks like https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/parsec-paper-letter.pdf constrained parser combinators to be LL(1)
<f-a> I suspect forth is not pleasant for parsing
<tabemann> forth is not pleasant for arbitrary data structures
<tabemann> unless you've written yourself a heap allocator
* tabemann has written himself a heap allocator
<tabemann> even then, it's not like working in a garbage-collected language
proteus-guy has joined #forth
rixard_ has joined #forth
mark4_ has joined #forth
travisb_ has joined #forth
tabemann has quit [Disconnected by services]
travisb_ is now known as tabemann
X-Scale` has joined #forth
mark4 has quit [Disconnected by services]
[1]MrMobius has joined #forth
mark4_ is now known as mark4
<tabemann> did a server go down or something?
<tabemann> because i just got disconnected, and I see a number of people rejoining just now
ecraven- has joined #forth
<mark4> i got booted
<f-a> matrix at it again?
<f-a> maybe just a netsplit
<f-a> no wait
<f-a> x tabemann [~travisb@172-13-49-137.lightspeed.milwwi.sbcglobal.net] has left
<f-a> Disconnected by services [#forth]
<f-a> x mark4 [~mark4@cpe-75-191-74-68.triad.res.rr.com] has left Disconnected by
<f-a> services [#forth]
<mark4> netsplit would not boot you
<f-a> what are you two up to :P
<mark4> i was disconnected
<f-a> by services yeah
scoofy_ has joined #forth
<tabemann> I ghosted myself
<mark4> i had to ghost my dead me too
nitrix_ has joined #forth
<f-a> now kiss
<f-a> and go all «are you “owo” or “uwu”?»
<f-a> are there archs where AUs are *not* the same as chars?
<f-a> (per ANS Forth)
joe9 has quit [*.net *.split]
KipIngram has quit [*.net *.split]
scoofy has quit [*.net *.split]
rixard has quit [*.net *.split]
X-Scale has quit [*.net *.split]
nitrix has quit [*.net *.split]
MrMobius has quit [*.net *.split]
really21 has quit [*.net *.split]
jess has quit [*.net *.split]
ecraven has quit [*.net *.split]
cmtptr has quit [*.net *.split]
klys has quit [*.net *.split]
ecraven- is now known as ecraven
[1]MrMobius is now known as MrMobius
X-Scale` is now known as X-Scale
cmtptr has joined #forth
<f-a> ok, deffo a netsplit ahappening
klys_ has joined #forth
<mark4> no it was not a netsplit
<mark4> netsplits dont cause people to totally lose their connections
<mark4> i was disconnected from the server entirely
jess has joined #forth
<f-a> after that I meant
KipIngram has joined #forth
KipIngram is now known as Guest74078
gravicappa has joined #forth
nitrix_ is now known as nitrix
really2 has joined #forth
sts-q has quit [Ping timeout: 264 seconds]
<siraben> f-a: Nonsense! Behold self-hosting LL(1) parser generator in Forth: https://github.com/siraben/meta-yacc
dave0 has joined #forth
f-a has quit [Quit: leaving]
sts-q has joined #forth
dave0 has quit [Quit: dave's not here]
scoofy_ has quit [Read error: Connection reset by peer]
<mark4> siraben: that link you posted is much more professionally presented than x4/x64/t4 :)
<mark4> like err.. you have docs and everything lol
<siraben> heh, I was a high schooler with too much free time after uni applications
<mark4> lol
<mark4> i have a dental appointment tomorrow and i am supposed to have paperwork filled in electronically before then. ;/
<mark4> i hates paperwork ive been procrastinating lol
* mark4 gets a JD :p
<remexre> siraben: any chance you've tried LR? been meaning to do that, I always suspected it'd be a good fit (use the data stack as the parse stack, etc)
<siraben> remexre: haven't looked into LR/LALR yet
<remexre> my hot take is, LR is totally worth learning, and not /that/ hard; LALR is a gross hack on top of it that gives the whole family of parsers a bad reputation
<remexre> but the forth side would be the same for both, the hack is in the generator
dave0 has joined #forth
<siraben> remexre: what advantage does LR have over LL(k)?
<remexre> can do left recursion; generally, warns you about problems ahead of time
<remexre> there exist some composition properties, but idk how generalizable they are
<remexre> (like, if you have two parse tables, there exist some guarantees about being able to parse "language A, but with every valid parse of language B as an Expr in A"
<siraben> I see.
really2 has quit [Ping timeout: 260 seconds]
andrei-n has joined #forth
klys_ has quit [Quit: Reconnecting]
klys has joined #forth
jedb_ has joined #forth
jedb has quit [Ping timeout: 260 seconds]
mark4 has quit [Remote host closed the connection]
mirrorbird has joined #forth
<proteus-guy> siraben, there's a fairly famous project that generates C code from forth. It's very forth-like yet incredibly readable. Naturally forth is also great for making any kind of compiler and could certainly make a C compiler should you want such a thing. :-)
proteusguy has quit [Ping timeout: 272 seconds]
<siraben> proteus-guy: Which project is this?
<proteus-guy> siraben, I haven't seen it in years.... I'd have to scour the interwebs for it again.... back ground is that he was a forth dev but his employer insisted on the project being done in C. So he wrote a forth program to write the C code. haha
<proteus-guy> he is also into literate coding styles.
<siraben> Interesting. Well a C compiler written in Forth would certainly be useful for bootstrapping since implementing Forth in assembly is straightforward compared to implementing a C compiler in assembler
<proteus-guy> there was also some other technical innovation he did that is what initially attracted me to his work but I've forgotten what it is.... now I have to go find it again...
<siraben> The Forth impl I was mentioning: https://github.com/oriansj/stage0/blob/master/stage2/forth.s , if anyone is up to the challenge
<siraben> I like this line in the README, heh: "Additionally, all code must be able to be understood by 70% of the population of programmers. If the code can not be understood by that volume, it needs to be altered until it satisfies the above requirement."
proteusguy has joined #forth
xek has joined #forth
<siraben> after some digging, found it: https://www.taygeta.com/forthcomp.html
<proteus-guy> Back when I looked it the sites were still alive. Wonder what happened....
<siraben> trying to get the unix sources to build... "kernel.c:9:24: error: unknown register name '%a3' in asm"
<siraben> Alas, looks like it was written for a different time and architecture.
<siraben> Nix expression to build it: http://ix.io/2SdP
<veltas> Costs money to keep a server running
<proteus-guy> i think it was his concept of optimal stack ops, "stack quarks", that made me first run into his site: https://web.archive.org/web/20060620011610/http://www.compusmart.ab.ca/rc/Timbre/index.html
f-a has joined #forth
joe9 has joined #forth
andrei-n has quit [Read error: Connection reset by peer]
hosewiejacke has joined #forth
andrei-n has joined #forth
m2rrorbird has joined #forth
mirrorb2rd has joined #forth
mirrorbird has quit [Ping timeout: 265 seconds]
mirrorbird has joined #forth
m2rrorbird has quit [Ping timeout: 264 seconds]
mirrorb2rd has quit [Ping timeout: 246 seconds]
andrei-n has quit [Read error: Connection reset by peer]
neto has joined #forth
Guest74078 is now known as KipIngram
andrei-n has joined #forth
hosewiejacke has quit [Ping timeout: 245 seconds]
tech_exorcist has joined #forth
f-a has quit [Ping timeout: 265 seconds]
andrei-n has quit [Read error: Connection reset by peer]
hosewiejacke has joined #forth
hosewiejacke has quit [Ping timeout: 245 seconds]
hosewiejacke has joined #forth
mirrorbird has quit [Ping timeout: 256 seconds]
hosewiejacke has quit [Ping timeout: 276 seconds]
mirrorbird has joined #forth
elioat has joined #forth
dave0 has quit [Quit: dave's not here]
mirrorbird has quit [Remote host closed the connection]
mirrorbird has joined #forth
mark4 has joined #forth
<mark4> had a dental appointment today for a full checkup and to schedule work... did the checkup when to pay and arrange for next appointment for the first of 4 cleanings and for one extration (aww).
<mark4> well. they threw a curve ball at me... they have time slots TODAY for both lol
<mark4> so. woke up today expecting a checkup and will be having an extraction :/
<mirrorbird> nice
andrei-n has joined #forth
f-a has joined #forth
f-a is now known as laPlastaAngloPar
hosewiejacke has joined #forth
laPlastaAngloPar is now known as f-a
hosewiejacke has quit [Ping timeout: 272 seconds]
elioat has quit [Quit: elioat]
<mark4> yea. had my second appointment and had my first cleaning. my bottom front teeth are not straing and one of them looks recessed compard to the others and i could never clean it right
<mark4> being a coffee drinker that tooth has been really badly stained for decades
<mark4> it freeking looks white now!
<mark4> my extraction is also later day. not looking forward to that lol
hosewiejacke has joined #forth
<mark4> want coffee lol but i probably wont taste it and dont want to burn myself lol
elioat has joined #forth
hosewiejacke has quit [Ping timeout: 245 seconds]
neto has quit [Ping timeout: 276 seconds]
gravicappa has quit [Ping timeout: 245 seconds]
gravicappa has joined #forth
Vedran has quit [Quit: The Lounge - https://thelounge.github.io]
<f-a> on gforth manual I read
<f-a> create-file ( c-addr u wfam – wfileid wior )
<f-a> c-addr: char address
<f-a> u: unsigned
<f-a> the ‘w’ in «wfam» and «wior» is?
hosewiejacke has joined #forth
<inode> cell
<f-a> ha silly me
<f-a> thanks
elioat has quit [Quit: elioat]
elioat has joined #forth
mark4 has quit [Remote host closed the connection]
hosewiejacke has quit [Quit: Leaving]
neto has joined #forth
gravicappa has quit [Ping timeout: 245 seconds]
f-a has quit [Ping timeout: 256 seconds]
mark4 has joined #forth
<mark4> took 15 minutes to do
<mark4> didnt feel a thing!
<mark4> yet lol
<veltas> Did you hear anything though
f-a has joined #forth
<f-a> I have lots of words like
<f-a> : create-output-file ( addr-s us -- wfileid ) w/o bin create-file throw ;
<mark4> no actually
<f-a> which I only use once
<mark4> i had headphones on and i dont think i needed them
<mark4> i did not hear any crunching or anything
<veltas> I would have asked for headphones, ugh would not enjoy that. I have a thing about teeth
<f-a> should I keep it that way or put w/o bin create-file throw in the body of the callee?
<veltas> f-a: It's up to you
<mark4> i had my own on, listening to music :)
<veltas> I would keep it factored like that, because I hate the noise
<mark4> i go back again for another cleaning session,
<veltas> Also I would use abort"
<mark4> yea im not a fan of throw in forth, i use abort and abort"
<mark4> i dont even know how to implement throw :)
<f-a> I lifted it from gforth manual
<veltas> It's not that hard but I have never had the urge
<veltas> The urge to use yet alone implement
<veltas> I find exceptions are the least thought-out part of any programming language, except Java really
<mark4> people badmouth java but what they should really be badmouthing is java coders who dont know what they are doing lol
<veltas> I don't like the way you pass parameters to a word that might throw, and then you need to drop the parameters again even if they're consumed
<mark4> java is a good language and for being oopificated it has a very small footprint
<veltas> Java is a bit dated and convoluted now but there were a lot of solid ideas early on
<mark4> and can be embedded
<veltas> And it's a stack machine!
<mark4> well so is C ;)
<boru> I'd argue that the C abstract machine has a bit of a bias toward register machines given keywords like `register`, though I suppose the implementation is free to ignore them.
<boru> I would agree that Sun had some clever guys working on Java in the early days, however.
<mark4> c traditionally does not pass parameters in register but on the stack due to the register starved nature of some processors :)
<boru> Hmm, I can't remember if Peter van der Linden worked on the JVM spec or language spec.
<boru> Stacks don't exist so far as the C abstract machine is concerned, I think. That's moreso an implementation detail, and usually defined by a calling convention, at that.
<boru> Being pedantic by way of the standard, that is.
<boru> I think that the closest you get to 'stack' is automatic storage.
<veltas> K&R C necessitates passing on the stack, because there are no prototypes, and any function can be variadic by just passing more parameters
<boru> I don't have the K&R spec to hand to see that, just ANSI/ISO.
<veltas> Google K&R 1st ed pdf, I think there's a scan on archive.org
<veltas> I use that when I want to double-check stuff, but prototypes are a pretty big difference I just know by heart, as are the variadic functions
<veltas> In K&R 1st ed they don't mention headers, and they only forward-declare functions (without declaring the number or nature of parameters) when the return type is not int
<boru> Well, the variadic functions bit also applies to ISO C, in the sense that `f()` implies unspecified arguments, whereas `f(void)` is no arguments.
<veltas> Yes because prototypes are (were?) optional
<veltas> K&R C feels much closer to Forth than ANSI C
<boru> I would say that's reasonable.
elioat has quit [Quit: elioat]
<boru> I was just scanning through UPE to see if there were any allusions to that requirement there, but it just defers to K&R 1ed.
<veltas> I seem to remember even the older x86 ABIs all used stack parameter passing
<veltas> And there was a "fast call" ABI you could choose per-function or as a special option that used registers
Vedran has joined #forth
<boru> Yeah, their stdcall cc was stack-centric for arguments.
<boru> That's the case for many calling conventions. Non-stacked arguments showed up on ISAs with lots of registers, first.
<boru> Fortunately, C wasn't developed with intel in mind.
<neuro_sys> All these time never checked K&R 1ed, good reminder.
andrei-n has quit [Quit: Leaving]
<neuro_sys> Every now and then I see pre ANSI C code which looks funny
<neuro_sys> I'm wondering if I can use Forth as a template pre-processor, as in, generate code for another language.
<neuro_sys> I obviously can, but in some other way than using s" " all over the place. Probably not very fruitful though.
<neuro_sys> One use case is that I felt like using it for generating Z80 code for an assembler.
<veltas> Maybe if you have a special sequence that switches into the language it's templating and back
<veltas> Like retro with ~~~ or whatever it is
<veltas> So when you encounter ~~~ it just starts adding every line to the output without changing, and then when it reaches another ~~~ it gets back to running forth code
neto has quit [Ping timeout: 260 seconds]
<veltas> Something like : ~~~ BEGIN REFILL SOURCE S" ~~~" COMPARE WHILE SOURCE TYPE REPEAT ;
<neuro_sys> That's good point
<veltas> Might need SOURCE TYPE CR actually
<veltas> I haven't tested that if it's not clear :P
<veltas> All my good points are stolen from crc and other people really
<neuro_sys> Using the input stream and the eval loop of Forth is something I forget the existence of
<neuro_sys> And hence I didn't know the words SOURCE and REFILL
bluekelp_ has joined #forth
bluekelp has quit [Ping timeout: 260 seconds]
<boru> I've got a listing for a Pascal compiler written in figForth if you're interested in it.
bluekelp_ has quit [Ping timeout: 245 seconds]
<veltas> *I'm* interested in that
<boru> It's a PDF scan. I uploaded it for MrMobius the other day. It might still be hosted. One moment.
bluekelp has joined #forth
<boru> I've got the listing for figForth for the 6809 as well, if you want it.
<veltas> That's on forth.org right?
<veltas> Or did you make that yourself?
<neuro_sys> I would be interested in too
<boru> It was a scan from the actual hard listing someone had.
<veltas> Did they ever do a fig-forth for Z80? I've got the scan for 8080 fig-forth
<boru> Just base64 decode it. It's a pdf.
<boru> It turned out to be too large for a paste site.
<boru> If you want the actual PDF itself, I can just upload that, either.
* veltas is fine decoding it
<boru> Just going through my NAS now. Nothing for the Z80 implementation, unfortunately.
<boru> Ah, I have the DMR C reference manual, which is taken from K&R 1ed.
<veltas> It's up to me to complete the collection then
<veltas> Is that just the C reference appendix?
<boru> Please do let me know what you come across. I've got some books which are out of print.
<boru> Yeah, just that.
<veltas> By "complete the collection" I mean I've written a forth for Z80
<boru> Ah, I thought you meant figForth documents.
bluekelp has quit [Ping timeout: 264 seconds]
bluekelp has joined #forth
Vedran has quit [Quit: The Lounge - https://thelounge.github.io]
Vedran has joined #forth
neuro_sys has quit [Ping timeout: 256 seconds]
bluekelp has quit [Ping timeout: 264 seconds]
neuro_sys has joined #forth
neuro_sys has joined #forth
neuro_sys has quit [Read error: Connection reset by peer]
neuro_sys has joined #forth
neuro_sys has joined #forth
neuro_sys has quit [Changing host]
mirrorbird has quit [Ping timeout: 245 seconds]
bluekelp has joined #forth
bluekelp has quit [Ping timeout: 246 seconds]
Vedran has quit [Quit: The Lounge - https://thelounge.github.io]
bluekelp has joined #forth
bluekelp has quit [Ping timeout: 246 seconds]
tech_exorcist has quit [Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world.]
Vedran has joined #forth
lispmacs has quit [Remote host closed the connection]
bluekelp has joined #forth