Oh, I know, but given my current knowledge of Forth even a naïve GoL implementation is challenging enoughTravis B. wrote: ↑Sun May 09, 2021 12:54 pmAs you must know, GoL-specific implementations can be more tightly optimized. One note though is that there is a trade-off between memory and speed; e.g. the fastest GoL implementations (i.e. hashlife) are less memory-efficient, while the most memory-efficient GoL implementations (i.e. one bit per cell) are slower.bradrn wrote: ↑Sun May 09, 2021 1:20 am What a coincidence! I’ve also been writing a GoL implementation as my first Forth project. It’s been tricky, but in an interesting way. GoL was also my first Haskell project, and I’ve since written a more general cellular automaton simulator as well. (It’s not at a releasable stage yet, even after ~3 years of on-and-off work, but I’m sure I’ll get around to it one day…)
The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Of course. But only the built-in languages are available on that menu.
I'd really appreciate it if you wanna take a look at this.
My latest quiz:
Kuvavisa: Pohjois-Amerikan suurimmat O:lla alkavat kaupungit
Kuvavisa: Pohjois-Amerikan suurimmat O:lla alkavat kaupungit
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
I have written up a temperature sensing project based on the LMT01 temperature sensor which uses zeptoforth 0.16.2 (or later).
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Looks interesting! Perhaps I’ll try it one day if I ever get zeptoforth working. It can’t be too hard to translate it to Arduino. In fact, the hardest bit will probably be finding the temperature sensor in the first place.
That being said, I have no idea how this is working. The Forth code actually isn’t too hard to follow, at least in broad outlines, but I have no idea how that circuit works. Electronics is not my strength, though for a while now I’ve been wanting to learn more about it. (Hmm… you wouldn’t happen to have any resources, by any chance?)
That being said, I have no idea how this is working. The Forth code actually isn’t too hard to follow, at least in broad outlines, but I have no idea how that circuit works. Electronics is not my strength, though for a while now I’ve been wanting to learn more about it. (Hmm… you wouldn’t happen to have any resources, by any chance?)
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
One clue about Arduino - Arduino people love their "libraries" and are lost without them to be honest. They in this case prefer a different temperature sensor, the DS18B20, which is much harder to work with and is much older tech than the LMT01, just because once upon a time someone wrote a "library" that supports it. The LMT01 is easy to find, by the way, on places like Arrow and Mouser.bradrn wrote: ↑Sat May 29, 2021 10:06 pm Looks interesting! Perhaps I’ll try it one day if I ever get zeptoforth working. It can’t be too hard to translate it to Arduino. In fact, the hardest bit will probably be finding the temperature sensor in the first place.
That being said, I have no idea how this is working. The Forth code actually isn’t too hard to follow, at least in broad outlines, but I have no idea how that circuit works. Electronics is not my strength, though for a while now I’ve been wanting to learn more about it. (Hmm… you wouldn’t happen to have any resources, by any chance?)
I should note that electronics is not my strength, either; that logic is based off of something someone I know created, except this is a single-LMT01 version and that originally used multiple LMT01's. Right now as I write this I am working on a version that works with multiple LMT01's hooked up to a single MCU, which the MCU measures in a round-robin fashion.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
- KathTheDragon
- Posts: 783
- Joined: Mon Jul 09, 2018 3:57 am
- Location: Disunited Kingdom
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Ah, OK.Travis B. wrote: ↑Sat May 29, 2021 11:44 pmOne clue about Arduino - Arduino people love their "libraries" and are lost without them to be honest. They in this case prefer a different temperature sensor, the DS18B20, which is much harder to work with and is much older tech than the LMT01, just because once upon a time someone wrote a "library" that supports it. The LMT01 is easy to find, by the way, on places like Arrow and Mouser.bradrn wrote: ↑Sat May 29, 2021 10:06 pm Looks interesting! Perhaps I’ll try it one day if I ever get zeptoforth working. It can’t be too hard to translate it to Arduino. In fact, the hardest bit will probably be finding the temperature sensor in the first place.
That being said, I have no idea how this is working. The Forth code actually isn’t too hard to follow, at least in broad outlines, but I have no idea how that circuit works. Electronics is not my strength, though for a while now I’ve been wanting to learn more about it. (Hmm… you wouldn’t happen to have any resources, by any chance?)
My problem here is that I’m a perfectionist and love to know exactly what’s going on; I’d hate to build electronics without a clear idea of what I’m doing, even if I know that someone else got it working. (Also, I’m doing a physics major, so I already have the right background for it.)I should note that electronics is not my strength, either; that logic is based off of something someone I know created, except this is a single-LMT01 version and that originally used multiple LMT01's. Right now as I write this I am working on a version that works with multiple LMT01's hooked up to a single MCU, which the MCU measures in a round-robin fashion.
I think it’s not the libraries that’s the problem; it’s the fact that most programmers don’t know what’s going on ‘under the hood’, so to speak. (I get the impression this is very much the philosophy of Forth: the ideal is to build everything yourself, from the operating system up.)KathTheDragon wrote: ↑Sun May 30, 2021 12:00 amWhy are you talking so derisively about libraries? What's wrong with using code someone else wrote?
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
It is not code reuse that's a problem with Arduino, but rather a lack of knowledge by many of the people who target it of the underlying hardware, an inability to read and interpret reference manuals and datasheets, and an inability to exercise the hardware without using someone else's code. For instance, when I have been working on zeptoforth, I have made good use of the reference manuals for the MCU's I am targeting rather than being limited to reusing someone else's code.KathTheDragon wrote: ↑Sun May 30, 2021 12:00 amWhy are you talking so derisively about libraries? What's wrong with using code someone else wrote?
In this case, I was able to put together a simple solution to measuring temperature with the LMT01 based on what I was able to read from the STM32F407 reference manual and the LMT01 datasheet. I chose the LMT01 because it provides a simple solution (measuring the temperature is literally just measuring edges with an interrupt handler when combined with an NPN transistor and a couple resistors) whereas others would choose an archaic solution just because someone wrote a library for that once.
Of course, this is by necessity, because what Forth code does exist for Cortex-M MCU's is mostly part of Mecrisp-Stellaris, which I am unable to reuse because zeptoforth is MIT-licensed (so that users can integrate zeptoforth in their binaries without running into licensing issues) while Mecrisp-Stellaris is GPL3-licensed, which is unfortunate.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
I wish I had a better understanding of electronics, TBH, but at this point I cannot even mentally exercise the relationship between volts, amps, and ohms...bradrn wrote: ↑Sun May 30, 2021 12:09 amMy problem here is that I’m a perfectionist and love to know exactly what’s going on; I’d hate to build electronics without a clear idea of what I’m doing, even if I know that someone else got it working. (Also, I’m doing a physics major, so I already have the right background for it.)I should note that electronics is not my strength, either; that logic is based off of something someone I know created, except this is a single-LMT01 version and that originally used multiple LMT01's. Right now as I write this I am working on a version that works with multiple LMT01's hooked up to a single MCU, which the MCU measures in a round-robin fashion.
Exactly. Forth is all about knowing the whole system and building things from ground up, and it is unfortunate that so many programmers today do not understand how things really work 'under the hood'. Forth is one of the few systems out there where a single programmer can know and understand the entire system and where the ability to create an entire system is within the average programmer's reach. Likewise, Forth has probably one of the highest if not the highest implementation to programmer ratio of all languages...bradrn wrote: ↑Sun May 30, 2021 12:09 amI think it’s not the libraries that’s the problem; it’s the fact that most programmers don’t know what’s going on ‘under the hood’, so to speak. (I get the impression this is very much the philosophy of Forth: the ideal is to build everything yourself, from the operating system up.)KathTheDragon wrote: ↑Sun May 30, 2021 12:00 amWhy are you talking so derisively about libraries? What's wrong with using code someone else wrote?
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
And unless you build all the hardware from scratch (including all the components) yourself, you *still* aren't doing it right.Travis B. wrote: ↑Sun May 30, 2021 12:20 am Exactly. Forth is all about knowing the whole system and building things from ground up, and it is unfortunate that so many programmers today do not understand how things really work 'under the hood'. Forth is one of the few systems out there where a single programmer can know and understand the entire system and where the ability to create an entire system is within the average programmer's reach. Likewise, Forth has probably one of the highest if not the highest implementation to programmer ratio of all languages...
Self-referential signatures are for people too boring to come up with more interesting alternatives.
- KathTheDragon
- Posts: 783
- Joined: Mon Jul 09, 2018 3:57 am
- Location: Disunited Kingdom
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
So? Have you considered that this might not be a concern for other programmers? Like, if I were going to do a project that would require an Arduino, I wouldn't want to get bogged down in the details of how the hardware works. I would want to find out how to do what I want it to do, and do that.Travis B. wrote: ↑Sun May 30, 2021 12:14 amIt is not code reuse that's a problem with Arduino, but rather a lack of knowledge by many of the people who target it of the underlying hardware, an inability to read and interpret reference manuals and datasheets, and an inability to exercise the hardware without using someone else's code. For instance, when I have been working on zeptoforth, I have made good use of the reference manuals for the MCU's I am targeting rather than being limited to reusing someone else's code.KathTheDragon wrote: ↑Sun May 30, 2021 12:00 amWhy are you talking so derisively about libraries? What's wrong with using code someone else wrote?
In this case, I was able to put together a simple solution to measuring temperature with the LMT01 based on what I was able to read from the STM32F407 reference manual and the LMT01 datasheet. I chose the LMT01 because it provides a simple solution (measuring the temperature is literally just measuring edges with an interrupt handler when combined with an NPN transistor and a couple resistors) whereas others would choose an archaic solution just because someone wrote a library for that once.
Of course, this is by necessity, because what Forth code does exist for Cortex-M MCU's is mostly part of Mecrisp-Stellaris, which I am unable to reuse because zeptoforth is MIT-licensed (so that users can integrate zeptoforth in their binaries without running into licensing issues) while Mecrisp-Stellaris is GPL3-licensed, which is unfortunate.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
I.e. one wants to do a hardware project without any concern for how to interface with the hardware programmatically. One would want it all to be hidden behind libraries so one does not have to actually understand what one is doing, and one does not want to learn anything about the software side of things.KathTheDragon wrote: ↑Sun May 30, 2021 5:33 am So? Have you considered that this might not be a concern for other programmers? Like, if I were going to do a project that would require an Arduino, I wouldn't want to get bogged down in the details of how the hardware works. I would want to find out how to do what I want it to do, and do that.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
- KathTheDragon
- Posts: 783
- Joined: Mon Jul 09, 2018 3:57 am
- Location: Disunited Kingdom
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
I have no idea how to respond to this. It smacks of pure elitism. You're doing programming right, I'm not. Have you written your own operating system in machine code yet?
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
It does rather sound like Travis is saying "In order to invent the wheel, one must first reinvent the wheel". I can see his point of view, but I don't think many people would agree with it.
Self-referential signatures are for people too boring to come up with more interesting alternatives.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
My perspective is that if one wants to learn how hardware works, one should interface with it directly in terms of registers and GPIO's and like. Sure, one can simply use a pre-written library that abstracts everything away, but at the end of the day, what have you learned? And sure, for an Arduino project that might not be your goal, but what is then? To simply put together something without understanding what one is doing?
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
- KathTheDragon
- Posts: 783
- Joined: Mon Jul 09, 2018 3:57 am
- Location: Disunited Kingdom
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
And what if you don't care about learning how the hardware works, you just want to use it? Idk, I think you're just being pretentious (like your use of "one", who actually talks like that?)
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Why would one be building a temperature sensor project then when one can simply buy a self-contained thermometer off the shelf with far less hassle if one is not doing it to learn something?KathTheDragon wrote: ↑Sun May 30, 2021 1:54 pm And what if you don't care about learning how the hardware works, you just want to use it? Idk, I think you're just being pretentious (like your use of "one", who actually talks like that?)
(About my use of one here, it is specifically to avoid the implication of using you that I might be talking about you, KathTheDragon.)
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
I can see more of a role for a temperature sensor library if one is not just trying to build a temperature sensor setup for its own sake, but if one is building a larger project that uses one or more temperature sensors as just part of it where one might not care about the details of individual components as opposed to that of the whole.
Yaaludinuya siima d'at yiseka wohadetafa gaare.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Ennadinut'a gaare d'ate eetatadi siiman.
T'awraa t'awraa t'awraa t'awraa t'awraa t'awraa t'awraa.
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
I think there is an argument for avoiding libraries in the specific case of electronics. If you’re doing anything much more complicated than just plugging one electronic device into the GPIO pins specified by the documentation, you’ll end up directly working with the hardware interface between the microcontroller and the device at some point. Which means that (a) you’ll need to know how everything works anyway, in order to avoid messing up the circuit, and (b) there’s a good chance of (accidentally or deliberately) doing something the library doesn’t support.
(And in general, I think there are good arguments for having at least a general understanding of the salient points of the level below yours. e.g. If I’m programming Haskell, it’s useful to have an idea of how the compiler deals with laziness internally. If I’m writing C, I need to understand memory management. If I’m making a webserver, it would be nice to know a bit about HTTP and TCP/IP so I know what’s going wrong. And so on and so forth.)
(And in general, I think there are good arguments for having at least a general understanding of the salient points of the level below yours. e.g. If I’m programming Haskell, it’s useful to have an idea of how the compiler deals with laziness internally. If I’m writing C, I need to understand memory management. If I’m making a webserver, it would be nice to know a bit about HTTP and TCP/IP so I know what’s going wrong. And so on and so forth.)
Conlangs: Scratchpad | Texts | antilanguage
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
Software: See http://bradrn.com/projects.html
Other: Ergativity for Novices
(Why does phpBB not let me add >5 links here?)
- KathTheDragon
- Posts: 783
- Joined: Mon Jul 09, 2018 3:57 am
- Location: Disunited Kingdom
Re: The Computer And General Tech Thread - Software, Hardware, Questions, etc.
Oh, I don't know, maybe you're building something that needs a thermometer?
I'm smart enough to know what impersonal "you" is, thanks.(About my use of one here, it is specifically to avoid the implication of using you that I might be talking about you, KathTheDragon.)
I never disagreed with this, frankly. All I said is that the offence taken at the idea that people might want to use a library for a solved problem is ridiculous. If you want to use a component for which a library exists, refusing to use it because it's a library is absurd. If you test it and find out it has issues that make it intractable, well, that's a whole nother problem, isn't it? But you can't just assume that.bradrn wrote: ↑Sun May 30, 2021 8:36 pm I think there is an argument for avoiding libraries in the specific case of electronics. If you’re doing anything much more complicated than just plugging one electronic device into the GPIO pins specified by the documentation, you’ll end up directly working with the hardware interface between the microcontroller and the device at some point. Which means that (a) you’ll need to know how everything works anyway, in order to avoid messing up the circuit, and (b) there’s a good chance of (accidentally or deliberately) doing something the library doesn’t support.
I never disagreed with this either, except I'd call this "having learnt the language/framework/toolchain/etc." properly.(And in general, I think there are good arguments for having at least a general understanding of the salient points of the level below yours. e.g. If I’m programming Haskell, it’s useful to have an idea of how the compiler deals with laziness internally. If I’m writing C, I need to understand memory management. If I’m making a webserver, it would be nice to know a bit about HTTP and TCP/IP so I know what’s going wrong. And so on and so forth.)