pull down to refresh
160 sats \ 2 replies \ @nerd2ninja 26 Oct 2022 \ on: Looking for simple $1 to #sats price ticker... bitcoin
What language is this? Just starting to learn to code and might try playing with this in Replit.
reply
Ruby mostly. Here's the thing with throwing up example code on the fly tho, I didn't run any of it to test. I'm already noticing things I missed. Like the fact that curl is a terminal command not native to ruby so you have to make a system call
price = system("curl https://www.usdsat.com/")
Bottom part is html5 but it uses ERB (embedded ruby) into the erb file (which is used instead of an html file) specifically used in the web development framework "ruby on rails".
Also, if you want to make a desktop app, I found the "glimmer" gem (modules in ruby are called gems) to be pretty good for that. glimmer references several ui frameworks and I like to use libui through glimmer.
ruby is an interpretive language, but it interprets to C (the programming language) so if you use sorbet and llvm you can compile your code rather than interpret it.
You should click on my nym here on stacker news. I got my repl linked where you can see some stuff I worked on (in the portfolio folder, the other folders were useful projects I forked)
reply