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
tech_exorcist has quit [Quit: tech_exorcist]
<KipIngram> Mandating a cell size - that really just takes the cake.
<KipIngram> What does it use for postpone's functionality?
rprimus has quit [Quit: leaving]
rprimus has joined #forth
<KipIngram> I assume it offers some sort of defining word functionality?
<KipIngram> Maybe I'm not remembering clearly what postpone does.
<mark4> its a bullshit replacement for compile and [conmpile]
<KipIngram> I have no idea what's in or not in the standard - I've paid it pretty much no attention at all.
<KipIngram> Ah, right. Yeah - I just have compile and [compile].
xybre has quit [Changing host]
xybre has joined #forth
shmorgle has joined #forth
cp- has quit [Ping timeout: 240 seconds]
cp- has joined #forth
dave0 has joined #forth
Kumool has joined #forth
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
jedb_ has quit [Ping timeout: 258 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #forth
sts-q has quit [Ping timeout: 252 seconds]
sts-q has joined #forth
djinni has quit [Quit: Leaving]
djinni has joined #forth
proteusguy has joined #forth
gravicappa has joined #forth
rixard_ has joined #forth
rixard has quit [Read error: Connection reset by peer]
f-a has joined #forth
hosewiejacke has joined #forth
f-a has quit [Read error: Connection reset by peer]
f-a has joined #forth
f-a has quit [Read error: Connection reset by peer]
f-a_ has joined #forth
f-a_ has quit [Client Quit]
f-a has joined #forth
f-a has quit [Read error: Connection reset by peer]
f-a has joined #forth
jedb has joined #forth
crest has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
crest has joined #forth
hosewiejacke has quit [Ping timeout: 240 seconds]
dave0 has quit [Ping timeout: 245 seconds]
f-a has quit [Quit: leaving]
hosewiejacke has joined #forth
Guest15985 is now known as neuro_sys
<neuro_sys> Hmm, I think I clobber up the internals because the stack shows extra values right after a word is called.
hosewiejacke2 has joined #forth
hosewiejacke has quit [Read error: Connection reset by peer]
<neuro_sys> 1 2 cr .s some-word, and inside the word I do cr .s, and I see two extra 0s appear at the top of the stack. :<
<veltas> neuro_sys: I've got some comments for you after looking at your code
<neuro_sys> veltas: Thanks, please share them, I'll read.
<veltas> Just need to get off my personal laptop, I'm at work while you're online apparently
<neuro_sys> I'm on a vacation now (or rather quit my job), I can be online whenever :)
<veltas> I didn't finish looking at it but there's some comments
<veltas> Some are more opinion/optional
<veltas> Well most of it really
<veltas> But that's what you get in a code review
<veltas> Why did you quit your job?
<neuro_sys> Ah these points look very useful
<neuro_sys> I quit because I had been working there primarily for money, now cashed out and quit after 4.5 years.
<neuro_sys> Now I'll pursue more varied and interesting jobs
<veltas> Where were you working? Google?
<neuro_sys> Nope, it was Unity3D
<veltas> I thought all jobs were for money :P
<neuro_sys> Yeah but this one I was working was all about money xD
<neuro_sys> At least what I had been doing was related to mobile games advertisements
<veltas> Well good luck finding a new job
<neuro_sys> I got one already and quit later. The next one will be full time graphics programming for a CAD-like software. I could do graphics at the previous shop, but for reasons it wasn't quite what I wanted.
<neuro_sys> I've always been interested in graphics and embedded systems, but never pursued them for a job somehow. Now I can take more risks.
<neuro_sys> Ah as to the memory clobbering, that wasn't it. I was just bitten by re-defining the same word in multiple files. I should start using vocabularies I guess.
dave0 has joined #forth
<neuro_sys> gforth step debugger helped figuring it out.
WilhelmV1nWeiner has quit [Quit: leaving]
WilhelmVonWeiner has joined #forth
<veltas> Nice
<veltas> Latest gforth has warnings on redefinitions, don't turn those off
<veltas> When does your vacation end then?
<neuro_sys> I actually thought redefining words was a good idea as long as I get the visibility/scope right. But apparently it wasn't. I use the same variable names (especially things like x, y, z) in different "modules". But I think I should instead use vocabularies in that case.
<neuro_sys> The next job start April 18th
<veltas> Yeah vocabularies or wordlists
kiedtl has quit [Changing host]
kiedtl has joined #forth
<inode> forgetting to return to the previous vocabulary can be just as confusing sometimes
<inode> ie. using ASSEMBLER in gforth and then suddenly loops stop working coherently until PREVIOUS (or FORTH) rolls around
<inode> yesterday, i wrote a : word to define CODE words and i had wanted to generate a sequence of stack POPs based on a parameter passed at creation time to be able to loop. the only way that worked well was to predefine a word that encapsulated -DO / -LOOP prior to calling ASSEMBLER
<veltas> I feel like wordlists are a bit of a pain in forth
<inode> have you found any alternatives for namespace-like behaviour?
<veltas> I think you could construct namespace-like behaviour with wordlists
<veltas> You could probably do a better job another way
<veltas> I'll think about it after work
<veltas> But I'm thinking some kind of way of making a word that does lookup from a wordlist, like you end up with PREFIX: NAME to get 'NAME'
<veltas> And there should be a way of making that wordlist just visible to the local module
<inode> what do you make of the nested : approach things like reForth punt? (STATE becomes a counter iirc)
<veltas> I don't know anything about it
<veltas> I think that's over-complicating things
WilhelmVonWeiner has quit [Quit: leaving]
WilhelmVonWeiner has joined #forth
<inode> should have pasted those in reverse order
hosewiejacke2 has quit [Ping timeout: 260 seconds]
crest has quit [Read error: Connection reset by peer]
crest_ has joined #forth
clog has joined #forth
f-a has joined #forth
tech_exorcist has joined #forth
WilhelmVonWeiner has quit [Quit: leaving]
<neuro_sys> I wonder if it's possible to trap into the debugger after a stack overflow with gforth
klys_ has quit [Quit: Reconnecting]
klys has joined #forth
lispmacs has joined #forth
hosewiejacke2 has joined #forth
<inode> neuro_sys: do you mean the same prompt provided by DBG?
<mark4> you could write a signal handler to do that i bet
<neuro_sys> inode: Yes
<neuro_sys> mark4: Good point. Although not much need, I was able to find what's causing it tracing manually.
<mark4> :)
gravicappa has quit [Ping timeout: 240 seconds]
gravicappa has joined #forth
f-a has quit [Quit: leaving]
mark4 has quit [Remote host closed the connection]
<veltas> Could check DEPTH doesn't get too large at intervals
hosewiejacke2 has quit [Ping timeout: 240 seconds]
j has joined #forth
j is now known as jess
lispmacs[work]` has joined #forth
f-a has joined #forth
lispmacs[work]` has quit [Read error: Connection reset by peer]
hosewiejacke2 has joined #forth
f-a has quit [Quit: leaving]
dave0 has quit [Quit: dave's not here]
Keshl has quit [Read error: Connection reset by peer]
<neuro_sys> Such a great feeling when everything just flows in the stack and your code reads like prose poetry.
<veltas> neuro_sys "flowing in the stack" is strong language for the amount of variables you use :P
<neuro_sys> That's the best review comment I got :D
<neuro_sys> But that's probably why I like it
<veltas> No I don't mean using variables instead of values
<neuro_sys> Ah, I completely switched to using values now, it looks much better
<veltas> Good
<veltas> But I mean using either variables or values extensively it's cheating a little to call it "flowing in the stack"
<neuro_sys> I still don't do much stack juggling except maybe 30%, for really simple and easy to follow things.
<neuro_sys> Yes, that's true. My comment for flowing in the stack was for an occasion I just had it (which is rare).
<veltas> Forth Programmer's Handbook has a section about this matter
<veltas> 6.3 "Wong's Rules for Readable Forth", rule 9: "Feature the stack machine"
<neuro_sys> Let me check
<veltas> And they mention it in 6.3.6 with an example by Leo Brodie from Thinking Forth that they believe is better with the stack rather than lots of variables
<veltas> I think it's quite opinionated but there is a school of thought that would chastise you for trying to say "flowing in the stack" with Brodie tier value/variable usage
<veltas> You can judge for yourself
<neuro_sys> I understand that, but my comment was not for the code I shared
<veltas> Fair enough
<veltas> I wasn't sure but I assumed all your code was a similar style
<veltas> I do make a lot of heavy assumptions :P
<neuro_sys> Reducing the stack usage is something I'm cautiously keeping to a minimum at the moment to reduce the effort, but slowly introducing them.
<veltas> I do like that Arch Linux's mupdf-gl starts with a warning every time complaining about the lack of correct build options
<veltas> My problem with Arch Linux is the maintainers all seem to think there is some value in building every app without clipboard support
<neuro_sys> I wasn't aware of mupdf
<veltas> mupdf-gl is alright, just a minimalistic PDF reader
<veltas> They don't support DPI scaling but my eyesight is good enough
<veltas> I mean of the application's text, not the PDF itself, obviously you can zoom that
<neuro_sys> I guess I internalized all the issues related to Arch Linux I don't even notice any issues any more. DPI scaling and clipboard madness is the two annoying ones.
<veltas> You notice if you actually try more than one distro
<neuro_sys> For clipboard I use a deamon called autocutsel which synchronizes the different clipboards
<veltas> Which different clipboards?
<veltas> Does it try and sync primary buffer and clipboard?
<neuro_sys> Primary and the clipboard yes
<neuro_sys> When one gets updated, it's sync to the other hand
<veltas> I am used enough to the weird X11 dichotomy to not want to change it at this point
<neuro_sys> I try to rely less on tools as the number of them otherwise increase a lot, and more chances to run into issues with them.
<veltas> The only significant change I've made in years was switching from dwm to i3
<neuro_sys> Haha same
<veltas> The default keybindings for i3 are so bad that originally I assumed it was just going to be crap
<neuro_sys> I also switched from vim to emacs a few years back, not sure if I've done the right thing, but too late to go back now.
<veltas> But it turns out it's just the keybindings, seems alright otherwise
<veltas> I tried learning emacs and it was fun, and I got proficient, but I ended up going back to vim.
<veltas> I did find out that there is not a whole lot of difference between vim and emacs in terms of functionality
<veltas> There are a few things emacs does better, which is the fact that it has consistent keyboard controls and dead simple window movement
rixard_ has quit [Read error: Connection reset by peer]
<veltas> vim is better at navigating a file, I use ^O and ^I loads and I can't remember if emacs supports that functionality the same way but I think there are some differences
<veltas> I can't imagine using a text editor that doesn't have "go back" and "go forwards" shortcuts
<veltas> And vim is a lot lighter/simpler
<neuro_sys> I was using vim only for editing code, and never checked Vimscript, but with Emacs I started learning Lisp simultaneously, and so it turns out Emacs is a Lisp VM. Now I do a bit more than just code editing. But Emacs is too slow.
<veltas> Yeah emacs is *the* lisp VM, if you learn Lisp a lot of people direct you to emacs first
<nihilazo> I'm a fan of acme
<nihilazo> as an editor
<nihilazo> but it's only an editor, which is odd to move to after being used to emacs/vim which are either a lisp VM or a "OH GOD WHAT EVEN IS THIS LANGUAGE" VM lol
<neuro_sys> Every time Emacs gets sluggish on me I consider a more lightweight editor, like Joe maybe.
<nihilazo> I really like acme
hosewiejacke2 has quit [Quit: Leaving]
<nihilazo> it's cool
<neuro_sys> I'll remember to check
<veltas> nihilazo: Yeah but I don't ever use vimscript, and I think most vim users avoid it. I don't really care about scripting my text editor, it already has all the things I want from the editor.
<veltas> I didn't ever use elisp either, just what I needed to configure emacs
<veltas> Set up a couple mode hooks
<neuro_sys> Here's my outdated emacs configuration: http://neuro.gereksiz.org/emacs.org/emacs/emacs.html
<neuro_sys> It's served from an old Beaglebone board so it may load a bit slow
<neuro_sys> Emacs's org-babel is pretty nice for literate programming, not that I use it for anything other than the configuration file. Although crc's seemed simple and elegant. Although Emacs's one has some obscene features, it's more like an interactive document.
<veltas> neuro_sys, nihilazo: Can we all agree to try out a Forth-scripted general purpose text editor when someone makes one?
<neuro_sys> Haha I was going to mention that, but you beat me to it.
rixard has joined #forth
<nihilazo> I prefer the editor not being scripted, and instead interacting with the outside world through some kind of consistent interface
<nihilazo> a la acme
<nihilazo> although I would like an editor that works nicely outside the confines of a VM I keep around just to run it :P
<veltas> It's all the same to me
<nihilazo> honestly the editor itself doesn't need much to be good for me
<veltas> I just want to make everything forthy, like rust programmers want to make everything rusty
<nihilazo> just a way to integrate with external commands and some way of making and following in-file links
<nihilazo> (most personal wiki software is so bloated, I literally implemented a personal wiki for acme in 7 lines of shell script lol)
<neuro_sys> True, simple is the best. I do use some fancy tricks with Emacs which I believe saves me a lot of time editing code though. I'm sure all editors have such features by now.
<nihilazo> I had a bunch of fancy stuff in vim
<nihilazo> then I started using acme
<nihilazo> which doesn't even have syntax highlighting
<nihilazo> all of the cool things about acme are under the hood
<nihilazo> but I find writing code in acme more enjoyable
<nihilazo> somehow
<neuro_sys> It's more enjoyable when the experience is clutter free, and there're less "parameters".
<neuro_sys> Speaking of which, I do work on pen & paper, and that's when I'm the most productive.
<nihilazo> people think I'm crazy that I dogmatically stick to not getting a smartphone
<nihilazo> w
<nihilazo> "why not get a smartphone, it does everything you do with your music player, ebook reader, games console, and tablet, and you only have to carry one thing!"
<nihilazo> "yes, but when I'm listening to music I don't want a web browser"
<neuro_sys> I sometimes go to a place where I don't have a computer with me, so I use the pen & paper to finish the whole code on paper, then it's the best feeling when you type it in, and it just works.
<nihilazo> *confused looks on everybody else's faces*
<nihilazo> everybody is so used to this one-device-for-everything thing that we've lost the art of focus
<nihilazo> a focused tool is the best tool
<neuro_sys> Haha sounds like the anti-thesis of Emacs
<neuro_sys> I'm on IRC now via Emacs
<neuro_sys> But I get what you mean
<nihilazo> I'm not an emacs fan
<nihilazo> well, weirdly, a lot of my devices are does-multiple-things devices
<nihilazo> like, my music player is running rockbox, a firmware with 15 million features
<nihilazo> but I only ever use the basic ones, because it's all I need. It's just that to get the few features I wanted I needed to have all the rest too
<nihilazo> I often find I'm in a place where I want more than the simple tool offers but less than the complex tool bogs me down with
<nihilazo> often minimalism comes at the expense of functionality, but functionality comes at the expense of feeling nice to work with
<neuro_sys> I think also I/we like to understand everything there is to the thing, so I don't like complex beasts.
Keshl has joined #forth
<neuro_sys> With simple things and the ability to understand them deep down allows you greater flexibility
<nihilazo> yeah
<nihilazo> I like understanding what I work with
<nihilazo> I can understand a plaintext file, I can't understand MS word
<neuro_sys> It's shivering to think the amount of number crunching the computers are doing for simple things today.
<nihilazo> my tablet idles using about 800mb of RAM
<nihilazo> I've still no idea how
<nihilazo> it's like a correlation to moore's law
<nihilazo> the faster computers get, the more ways we find to make them feel slower
<neuro_sys> It is ridiculous, it's the ultimate "externalized cost" of the computer industry. It's so that the production costs are cheaper and cheaper for the producers.
<nihilazo> I still wonder how we ended up at modern versions of microsoft word that run inside a browser engine and let you import 3d models with a PBR renderer
<nihilazo> like
<nihilazo> does literally anybody who uses word make use of the built in *PBR fucking 3d rendering engine*
<neuro_sys> But it'll go back I think as the computers aren't going any faster, but the amount of data and processing is still increasing.
<neuro_sys> Haha
<nihilazo> like, the only use of it is that you can then open up the files and extract the 3d models
<nihilazo> because for some reason, the library of 3d models in word and powerpoint are really well made??
<nihilazo> the ones that literally nobody ever has any reason to use, ever, but mean that office applications have a PBR rendering engine included?
<neuro_sys> I have been using exclusively Google Docs for Office stuff due to work for several years, but my next job works with MS, so I'll have to start using them.
<nihilazo> well, it's not real PBR
<nihilazo> it's an approximation of PBR, obviously
<nihilazo> but like, if you import a model of a fish into powerpoint the light will glint off each scale
<nihilazo> it's still impressive stuff
<nihilazo> I've been using plaintext of sometimes markdown files for all my writing for a while now
<veltas> MS like a lot of companies have this issue where none of the devs coming in want to improve stuff people use, they want to do fun stuff
<nihilazo> still not found a good spreadsheet application
<veltas> Forth is a good spreadsheet application
<nihilazo> I use jessyink for presentations because it's just the most flexible to me, and I like giving presentations in ways that are alien to the usual office suites
<nihilazo> (aka, actually good presentations)
<veltas> I'm writing an article explaining how to use Forth as your spreadsheet (but not really a spreadsheet)
<nihilazo> I'd love to read that
<nihilazo> I've been wanting to build something for D&D character sheet management for a while
<nihilazo> and I feel like forth probably would do a good job
<veltas> Do it man
<veltas> My favourite spreadsheet program is awk
<nihilazo> awk is good
<neuro_sys> Not perfect, but as an option Emacs org-mode has spreadhseet support with Elisp for formulas.
<veltas> I wrote a simple GUI program in awk, bash, and zenity
<nihilazo> but that requires all of emacs neuro_sys
<neuro_sys> :D
<nihilazo> I wonder if there's a way to do "mobile" GUI (gtk/libhandy) with forth
<veltas> The CSV mode in emacs is good
<nihilazo> I feel like GUI is something that forth devs tend to dislike philosophically, but my main device I use while playing D&D is touchscreen
<veltas> I don't know if that's true
<veltas> The original forth application was a graphical program, or at least the current iteration of it is
<nihilazo> gtk is a mess but like, libhandy is cool
<veltas> A lot of embedded applications need graphics for a touchscreen
<nihilazo> I'm not sure if you could use gtk with forth. gforth probably could with C interop but that's a pain
<nihilazo> or anything that would do touchfriendly GUI on linux really, GTK is just what is "native" on my tablet
<veltas> Yes well currently I have been investigating C-library-compatible forths
<veltas> Because it's obvious that if you want to use forth on the desktop you need a C FFI
<veltas> The only Forth I've found that has a C FFI and has a licence that won't have annoying repurcussions on a proprietary project is pForth
<veltas> Which is a C forth, so a lot of forthers probably don't even consider it a real forth
<veltas> But it's quite simple and not a carcinogen like gforth
<veltas> And it's a permissive licence, not GPL
<veltas> If mark4's x4 had an FFI I'd use that, he has said he'll put an MIT licence on it
<veltas> nihilazo: I quite like GTK, I think people complain about it too much
<nihilazo> I like GTK too
<nihilazo> I've run into a barrier with my current forth project but said barrier is design-related rather than technical
<nihilazo> which makes me happy
<nihilazo> like, game design rather than program design
Keshl has quit [Ping timeout: 260 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
<nihilazo> and now I'm having ideas for how I'd implement this character sheet tool thing to be flexible
<neuro_sys> I have an itching desire to implement AD&D 1ed (or OSRIC) by the book.
<nihilazo> the problem with existing character sheet tools for me is their lack of flexibility to different systems
<neuro_sys> But it's a stupid idea, since the code would be entirely look up tables.
<nihilazo> the only thing I found flexible enough was a spreadsheet, which does a bad job with a lot of stuff
<nihilazo> spreadsheets are fragile things
<nihilazo> they break very easily
* nihilazo is going to sleep, gn
Zarutian_HTC has joined #forth
<neuro_sys> Good night
<veltas> neuro_sys: Is that in forth?
<veltas> If so bravo, very interesting
<neuro_sys> Yes, all in Forth
<neuro_sys> Except the layer that provides the screen buffer.
<neuro_sys> I want to run it on a small computer (Amstrad CPC even) with lower resolution, and not animated.
<neuro_sys> I'm curious to see how long it will take to render a single image.
<neuro_sys> I also avoided using FPU, so it's 4.14 fixed point.
<veltas> That's really cool neuro_sys
<neuro_sys> Thanks!
<neuro_sys> I updated the model loader code, I'll share the whole thing later
<neuro_sys> It's completely useless, but at least I can use it to make (theoretically) any device that runs Forth display any 3d model exported via Blender given it has enough memory :)
<neuro_sys> The color depth is an issue though, on Amstrad CPC 320x200 screen mode supports only 3 colors, so I'll try to figure out an efficient way to do dithering on it.
tech_exorcist has quit [Quit: tech_exorcist]
<Zarutian_HTC> neuro_sys: hmm read the blog post of the guy who made the game Return to the Obra Dinn