Page 15 of 64

Re: Happy things thread!

Posted: Fri Feb 28, 2020 11:49 am
by Travis B.
chris_notts wrote: Fri Feb 28, 2020 11:30 am Are you directly generating the machine code, or are you using a 3rd party library like the LLVM?
Oh, I am generating the machine code directly. This is on an ARM Cortex-M4 microcontroller (the STM32L476 to be exact), so there really is not room for anything like LLVM onboard.

(What I have implemented, at least last time I checked it, was about 14K in size, so it's really tiny, especially since the runtime is running from Flash, which on the STM32L476 is 1M in size.)

Re: Happy things thread!

Posted: Fri Feb 28, 2020 12:07 pm
by chris_notts
I wasn't sure if it was some kind of cross compiler of if the entire lot was running on the microcontroller. It sounds like a fun project though - not many people are interested in doing low-level stuff nowadays.

Re: Happy things thread!

Posted: Fri Feb 28, 2020 3:17 pm
by Travis B.
chris_notts wrote: Fri Feb 28, 2020 12:07 pm I wasn't sure if it was some kind of cross compiler of if the entire lot was running on the microcontroller. It sounds like a fun project though - not many people are interested in doing low-level stuff nowadays.
I have always wanted to write something that runs on bare metal, which is hard to do on a PC with how elaborate the hardware interfaces are (which often require uploading firmware, which often is proprietary), but which is much simpler on something like a microcontroller. Likewise, I have always wanted to write a subroutine threaded/native code inlining compiler; I have written other Forths before, but they were indirect threaded or token threaded instead. People do not infrequently write tethered Forth implementation where a parent Forth implementation compiles code on a PC and then downloads it to the child microcontroller, using something like a very small stub or even just using JTAG or ST-Link, but I wanted something that would run completely on the microcontroller, so I could just attach a USB cable (for serial over USB), open up a program like screen, and begin coding.

Re: Happy things thread!

Posted: Sun Mar 01, 2020 8:20 pm
by Travis B.
Yes! Got compiling to flash and running code compiled to flash working, including after rebooting!

(I am really happy with the progress I have made. It has been just a week and a half since I started testing/debugging zeptoforth, yet it already feels quite functional, and is able to compile to both RAM and flash and execute a variety of control structures.)

Re: Happy things thread!

Posted: Mon Mar 02, 2020 4:33 am
by alice
Travis B. wrote: Fri Feb 28, 2020 3:17 pmI have always wanted to write something that runs on bare metal
Pffft. *Real* men *build* the bare metal! Do you mean to say you don't fabricate your own ICs from scratch?

But seriously, I'm currently (health permitting) working on a project to build a 1980's-era 8-bit computer, complete with output to the TV. It'll probably run something which I invented like Forth.

Re: Happy things thread!

Posted: Mon Mar 02, 2020 10:49 am
by Travis B.
I am trying to figure out if there is a better way of finding the last unflashed page of memory than by checking from the end of flash towards the start if any word in it is something other than $FFFFFFFF, and then finding the last word in memory by searching backwards in flash from that point for the last instance of $DEADBEEF.

($<hex> is the traditional Forth way of writing what in C is 0x<hex> or in x86 assembly is <hex>h.)

Re: Happy things thread!

Posted: Mon Mar 02, 2020 10:51 am
by Travis B.
alice wrote: Mon Mar 02, 2020 4:33 am
Travis B. wrote: Fri Feb 28, 2020 3:17 pmI have always wanted to write something that runs on bare metal
Pffft. *Real* men *build* the bare metal! Do you mean to say you don't fabricate your own ICs from scratch?

But seriously, I'm currently (health permitting) working on a project to build a 1980's-era 8-bit computer, complete with output to the TV. It'll probably run something which I invented like Forth.
Unfortunately I am not that familiar with hardware (I am really a software guy), even though I took a digital logic design class in college where the final project was to develop a (simulated) microprocessor. So simply programming a board containing a microcontroller, with outputs that I could attach things to if I really felt like it, is enough for me.

Re: Happy things thread!

Posted: Wed Mar 04, 2020 11:50 am
by Travis B.
Well, I fixed some bugs in the way I was handling comments, which were causing some very strange crashes, and I think I got CREATE working... but I somehow forgot to make the words it create VISIBLE, so you cannot actually use them (I will fix it when I get off of work tonight).

Re: Happy things thread!

Posted: Sat Mar 14, 2020 3:59 am
by Vijay
I was kind of worried maybe I wasn't eating enough here in my new home in Yuanlin, but today, now that I don't have to go to work, I decided to try imitating what Taiwanese people do and eat at a few different places in succession. Luckily, the onion pancake place was finally open, so I got one piece, and they were even kind enough to top it off with hot sauce. Then I went a few shops down the road to Ba Fang, the national dumpling chain, where I got a nice big steaming bowl of their original noodle soup, which has only noodles and bean sprouts.

After that, I walked back towards the bike shop where I live and stopped off at the Shanghainese-style dumpling place to eat one bamboo steamer's worth of spicy soup dumplings (about 7-10). I get the impression that people think you absolutely must drink the soup out of a soup dumpling first or else you'll burn your mouth; this may be true of the first one, but apart from that, they are wrong because I just eat them whole after that. There are two men there who I've only ever seen either wrapping dumplings or having lunch; they don't seem to talk to any of the customers or do anything else. There is also a young lady who seems to do everything else as well as some of the dumpling-wrapping. Today, while I was eating there, a small group of people waited just outside. "Oh, it's okay!" the young lady said (I don't remember her exact words, but it was something to this effect). "You can have a seat first and then show me what you want from the menu." The three of them got to work making so many dumplings they had to get plastic cartons (shaped like egg cartons) to hold the dumplings while making them, but one of the two guys (I think the older one) dropped the cartons while trying to get them, and I tried to help him pick them up. He said, "Xiexieeeeeee!" and then I dropped one of them again. :lol: After eating my dumplings, while still at the dumpling place, I started eating some pineapple I bought at the open-air fruit market divided by a busy intersection with no functioning traffic lights before I ate any of these things. I couldn't finish it there, but I walked back to my apartment and just finished eating it now. :)

Maybe if I'm really lucky, I'll finally manage to get all my laundry done this weekend, too.

Re: Happy things thread!

Posted: Tue Mar 17, 2020 11:54 am
by Travis B.
Well I got a multitasking blinker working (it blinks two LEDs on my DISCOVERY board, back and forth, and being multitasking I can still enter Forth code/commands while the blinker runs), then wrote some code that uses a task to vary the rate of the blinker in an up-and-down pattern, then abstracted out all the hardware dependent code from my Forth code (it had already been abstracted out for my assembly code), so one could port them to another piece of hardware just by changing some bits of driver code, then wrote some DO LOOP routines, which was a pain but was worth it. It's been a very productive past two weeks.

Re: Happy things thread!

Posted: Tue Mar 31, 2020 4:29 pm
by Travis B.
On the topic of zeptoforth, on the STM32L476 DISCOVERY board I got the systick, interrupt-driven IO, and sleeping working, and in my new port to the STM32F407 DISCOVERY board I got the systick and interrupt-driven IO working (but unfortunately not sleeping). I also have a new user for my STM32F407 port, so I have someone else testing it as well.

Re: Happy things thread!

Posted: Tue Mar 31, 2020 7:44 pm
by Linguoboy
I've finally figured out how to get me to do cardio regularly: make it the only way I can ever leave my house to talk to people.

Re: Happy things thread!

Posted: Wed Apr 01, 2020 2:01 pm
by Travis B.
Linguoboy wrote: Tue Mar 31, 2020 7:44 pm I've finally figured out how to get me to do cardio regularly: make it the only way I can ever leave my house to talk to people.
What about social distancing though?

Re: Happy things thread!

Posted: Wed Apr 01, 2020 2:09 pm
by Linguoboy
Travis B. wrote: Wed Apr 01, 2020 2:01 pm
Linguoboy wrote: Tue Mar 31, 2020 7:44 pm I've finally figured out how to get me to do cardio regularly: make it the only way I can ever leave my house to talk to people.
What about social distancing though?
It's not hard to maintain at least 2 meters distance where I live.

Re: Happy things thread!

Posted: Sat Apr 04, 2020 1:33 pm
by chris_notts
I was out in the garden today, bees buzzing and butterflies flitting around now the temperatures have picked up again. There's something very soothing about nature going about its business. I wanted to take a picture of the orange tips on the honesty (lunaria annua), but they wouldn't cooperate. I think they lay their eggs on honesty, so maybe I'll get some home-grown ones later in the year?

Re: Happy things thread!

Posted: Mon Apr 06, 2020 10:49 am
by Travis B.
I have just ordered a Nordic Semiconductor NRF52840-DONGLE board as of last night, at a cost of a mere $10 (some of the more elaborate Nordic Semiconductor development boards were much more expensive, on the order of $100+), so another port of zeptoforth should be coming soon. Furthermore, this dongle has support for low power wireless communication, so wireless drivers for zeptoforth may be coming soon.

Re: Happy things thread!

Posted: Tue Apr 07, 2020 12:17 pm
by alice
Last year I bought myself a reconditioned laptop which met all of my needs. The only problem was that it had a funny keyboard - the left Shift key was too large, the double quote was on the same key as the apostrophe, the backslash was above Enter, and so on - and it became increasingly annoying to have to adapt to it, even with the keys remapped as far as possible. Eventually I'd had enough and got a dud laptop with a proper keyboard off eBay. It should have been a simple matter of moving the good keyboard into the good laptop (hereafter L1), but the keyboards were both firmly stuck in place for no obvious reason.

First of all I simply put the good hard drive into the dud laptop (hereafter L2), which was otherwise in working order. Then it turned out that L2 had a lower resolution screen than L1, so I had to change the screens over, and since the connectors for the screens were different sizes, I had to change the motherboards over too. Then the rather fiddly wires to the wi-fi chips in L2's lid broke, so I had to reunite the screens with their original lids, so that what I now have is L1's motherboard, hard drive, and lid mated with everything else of L2, including a keyboard as the LORD intended. Fortunately it all works fine and there weren't any problems with any of the transplants, so I can now truthfully say that I've successfully bred my first laptop. And I got some extra memory out of it too.

Re: Happy things thread!

Posted: Tue Apr 07, 2020 9:25 pm
by Travis B.
I fixed the IO problems I was having with zeptoforth! It turned out to be a stupid bug with my circular buffer implementation that was causing it to sporadically lose data when under high load.

Re: Happy things thread!

Posted: Tue Apr 07, 2020 10:04 pm
by Vardelm
So far, I'm having a great pandemic!
  • I'm working from home, and with a home office I'm able to do so quite comfortably and not much different from my work office.
  • Due to working from home, I have 15 more free hours in my week due to not commuting & lunch hours.
  • I'm spending less money on gas & food.
  • I've lost some weight due to not eating as much Thai food, lattes, etc.
  • My work team hasn't had much regular project work, so I've been able to do a ton of MEL scripting (for Autodesk Maya) to make the team more efficient & solve some stresses we had last year.
  • I don't have to work around certain co-workers. This makes me less grumpy.
  • I've generally been sleeping about an hour less per night but sleeping much better such that I'm well rested in the morning.
  • My current grad school class was moved online, so I don't need to commute 1.5 hours 1-way up to campus 1x / week, which gives more time. I miss going up there, but the time makes up for it.
  • The remaining 3 classes I have are all online, which is pretty good timing.
  • Work hours are 9-6, which allows me a fairly relaxed morning. I get up at 7 - 7:30 and can take my time getting cleaned up & eating breakfast.
  • I cut my own hair for the 1st time last weekend, and it looks almost the same as from a barber. That's an expense that doesn't exist in the future!
I realize there are many people who are struggling. I have friends who have serious financial pressure building, and others who have had COVID-19. I count myself extremely fortunate to be in my current position. If I can stay healthy, I plan to just keep enjoying the moment.

Stay safe all!

Re: Happy things thread!

Posted: Tue Apr 07, 2020 11:18 pm
by elemtilas
For anyone here into worldbuilding, I'm pleased to announce that I've uploaded a new revision of the great Ethnographical Questionnaire.