Post 3342027 by drzaiusx11@mastodon.social
(DIR) More posts by drzaiusx11@mastodon.social
(DIR) Post #3339179 by natecull@mastodon.social
2019-01-24T21:38:52Z
1 likes, 1 repeats
I am really enjoying Node.jsIt is like having GWBASIC again after 30 years, except, slightly less terrible. It is like I have a computer again! One that I can *program*! Interactively!I never got this feeling from Perl, PHP, Python, or Ruby.Python in fact goes several miles out of its way to NOT give me this feeling.Python always wants to remind me that it is a Script stored in Files Like A Proper Grownup Language, and that I should really Not Be Trying To Do Anything In The REPL.
(DIR) Post #3339180 by natecull@mastodon.social
2019-01-24T21:40:45Z
0 likes, 0 repeats
But having a REPL is *why we built interactive computers*.If you focus a programming language entirely on the IDE and Compiler, you are missing most of the point of computers.At least computers that have screens and keyboards attached.The Editor-Compiler workflow is an excellent tool-to-problem fit if all you have is a card punch and card reader and a computer that reads punchcards and spits out other punchcards.
(DIR) Post #3339181 by natecull@mastodon.social
2019-01-24T21:42:10Z
0 likes, 0 repeats
One of the biggest things that makes Python very REPL-hostile is its mandatory whitespace indentation.REPLs and significant whitespace don't mix.Sorry Pythonistas! But your language decided as a matter of principle to hate me.
(DIR) Post #3339182 by natecull@mastodon.social
2019-01-24T21:45:08Z
0 likes, 0 repeats
Of course we could invent MUCH better and richer GUI interfaces to a programming language than the clunky old REPLbut, so far, we haven't
(DIR) Post #3339183 by natecull@mastodon.social
2019-01-24T21:53:43Z
0 likes, 0 repeats
the GUI equivalent of a REPL would be a windowing system where every single graphical widget or group of widgets can be:* copy-pasted * seamlessly round-trip converted to and from a canonical text representation of its structure, with zero hidden symbols or data loss* created, deleted, composed and decomposed and transformed at runtime in exactly the same way you can do string operations on a string and read/write strings to and from files
(DIR) Post #3339184 by natecull@mastodon.social
2019-01-24T21:56:21Z
0 likes, 0 repeats
Why a 'canonical text representation'?Because computers have keyboards and the keys have text on them. They are how we do high-bandwidth, high-detail data entry.If your computer has no keyboard of any kind then MAYBE a GUI with no text representation of its contents makes sense.
(DIR) Post #3339185 by sydneyfalk@elekk.xyz
2019-01-24T21:59:17Z
0 likes, 1 repeats
@natecull I keep saying ASCII art had the right idea -- create tools that can read basic ASCII diagrams and convert that into GUI elements. Different files can be different components, so you can spec in text whether the described elements are "relative", "absolute 200 px", etc. etc.an IDE with the structural text representation on one side and then end result GUI representation on the other
(DIR) Post #3339654 by maxmustermann@shitposter.club
2019-01-24T22:19:48.937609Z
0 likes, 0 repeats
@natecull OK. Haven't we gone away from interactive programming for some reasons ? Asking as someone who home computers that work like that from time to time.
(DIR) Post #3340668 by grainloom@cybre.space
2019-01-24T23:01:39Z
0 likes, 0 repeats
@natecull but Python has IPython and help(), does Node have that?the builtin docs are the best thing ever and all scripting languages should have it imho
(DIR) Post #3340720 by natecull@mastodon.social
2019-01-24T22:03:55Z
0 likes, 0 repeats
@sydneyfalk Yes! That would be awesome.If we have that canonical text representation, we can over time... forget about it, and start to use the graphical representation, once we've built up enough shared libraries that we can communicate.
(DIR) Post #3340745 by grainloom@cybre.space
2019-01-24T23:05:26Z
0 likes, 0 repeats
@natecull @sydneyfalk afaik Apple's UI toolkit has something like this, where you generate constraints for Cassowary from text filesthere was also a project to get CSS on Cassowary but it didn't get very far
(DIR) Post #3340858 by drzaiusx11@mastodon.social
2019-01-24T21:58:54Z
0 likes, 0 repeats
@natecull if you like js, repls and microcontrollers checkout espruino. It's a micro that boots to a js repl you interact with over a serial terminal like minicom
(DIR) Post #3340859 by natecull@mastodon.social
2019-01-24T22:01:01Z
0 likes, 0 repeats
@drzaiusx11 That sounds interesting!At the moment I am liking JS but I have no particular desire for microcontrollers.What I like is that I can, eg, build up, interactively, a database of Chinese characters, and then create and pose queries to it at runtime.Yes, I use a text editor for large chunks of code and I reload them when I make big changes.But the fact that I can just whip up an arrow function to search an array as a database... it is so empowering.How could I do that in a GUI?
(DIR) Post #3340860 by natecull@mastodon.social
2019-01-24T22:02:02Z
0 likes, 0 repeats
@drzaiusx11 I guess what I have been missing is the feeling of *dialogue* with a computer, where the words and sentences are more complex than 'click here' and 'fill out this form'.
(DIR) Post #3340861 by drzaiusx11@mastodon.social
2019-01-24T22:05:32Z
0 likes, 0 repeats
@natecull I like the tight feedback loop of repls. Screw compiling, I want to be able to inspect, modify and extend my code at runtime (sure you can technically do that with any debugger but it's a PITA)
(DIR) Post #3340862 by natecull@mastodon.social
2019-01-24T22:08:37Z
0 likes, 0 repeats
@drzaiusx11 It's especially great when your 'code' is mostly data, of a semi-structured kind, and you're still exploring and learning / inferring the structure.Ideally I'd like something that combines editor, database, filesystem, programming language, debugger, GUI, version control, in one.A sort of... personal data interpretation and visualisation console?
(DIR) Post #3340863 by grainloom@cybre.space
2019-01-24T23:10:00Z
0 likes, 0 repeats
@natecull @drzaiusx11 have you seen OpenGenera? afaik that had most of what you're describing...
(DIR) Post #3340896 by natecull@mastodon.social
2019-01-24T23:11:22Z
0 likes, 0 repeats
@grainloom IPython seems to be heading in the right direction! I haven't yet figured out how to make friends with it though.I agree that online help is wonderful (I love Powershell's help system) and I don't think Node has one out of the box, but, JS is sufficiently flexible that it would be possible to make a set of tools that do that.
(DIR) Post #3340941 by natecull@mastodon.social
2019-01-24T22:13:28Z
0 likes, 0 repeats
@drzaiusx11 I gotta get me set up with git so I can start to publish snippets of code / data. Just for fun. But it annoys me that we still need so many different social data tools.Fediverse for talk, email for business, blogs for publishing, git + a hub + a package repository for code, even if it's literally a one-line function... we should be able to unify some of these in one pub-sub architecture surely?
(DIR) Post #3340942 by grainloom@cybre.space
2019-01-24T23:12:37Z
0 likes, 0 repeats
@natecull @drzaiusx11 baking in a specific form of version control at the VM / stdlib level could be problematic..... but image snapshots and snapshot diffs are always an option (image as in "VM memory dump")
(DIR) Post #3341041 by grainloom@cybre.space
2019-01-24T23:17:36Z
0 likes, 0 repeats
@natecull maybe... I've experimented with it in Lua (which is imho a better language than JS) and that can do itbut you need weak tables for it and I don't think there is a portable way to do that in JSthis is the thingy i wrote for it: http://gitlab.com/raingloom/manners
(DIR) Post #3341085 by natecull@mastodon.social
2019-01-24T23:19:26Z
0 likes, 1 repeats
@grainloom I know Lua is a much better language than JS. :(But JS is a *popular* language and sadly that means a lot more than being better.Popularity answers questions like 'can I Google to find out in 5 seconds what the syntax is' and 'can I assume everyone I want to give code to has it and knows how to start it'
(DIR) Post #3341112 by grainloom@cybre.space
2019-01-24T23:20:37Z
0 likes, 0 repeats
@natecull the main idea is there, but the API ergonomics haven't been tested. you basically just have a big-ass table where you register objects (eg. functions, tables, constants, it works with just about anything (you can use anything as a table key except +/-NaN and nil)) and some kinda metamethod for getting it for objects (eg. the docs for Dog:new("Doggo1") should link to the docs for the Dog class. this and documentation links is where I kinda got stuck.)
(DIR) Post #3341127 by natecull@mastodon.social
2019-01-24T23:21:15Z
0 likes, 0 repeats
@grainloom Lua distinguishes between positive and negative NaN ??
(DIR) Post #3341131 by grainloom@cybre.space
2019-01-24T23:21:41Z
0 likes, 0 repeats
@natecull the nice thing is, Lua's syntax is so simple, you don't have to google things about it :blobuwu:
(DIR) Post #3341197 by grainloom@cybre.space
2019-01-24T23:23:44Z
0 likes, 0 repeats
@natecull edit: hmmmmm i might be remembering wrong... lemme just... *opens repl*
(DIR) Post #3341236 by grainloom@cybre.space
2019-01-24T23:24:39Z
0 likes, 0 repeats
@natecull yes, math.sqrt(-1) returns -nan on my x64 machine on Lua 5.3
(DIR) Post #3341300 by grainloom@cybre.space
2019-01-24T23:26:07Z
0 likes, 0 repeats
@natecull it's probably not Lua that distinguishes it but the IEEE floating point standardbut besides it showing a different value when converted to string I don't know what other ways this distinction shows up... maybe you can use it in calculations, idk
(DIR) Post #3341320 by natecull@mastodon.social
2019-01-24T23:26:41Z
0 likes, 0 repeats
@grainloom Hmm. Starting to think that raving mad maths professor a few years back talking about 'transreal' numbers had a point. A lot of people said his 'nullity' was just equal to IEEE NaN, but, I guess it wasn't cos his isn't signed.https://en.wikipedia.org/wiki/James_A._D._W._Anderson#Transreal_arithmetic
(DIR) Post #3341328 by grainloom@cybre.space
2019-01-24T23:26:56Z
0 likes, 0 repeats
@natecull but Lua just uses whatever C numeric type you give it when you compile it, you could probably use VAX floats and it wouldn't bat an eye
(DIR) Post #3341686 by bob@soc.freedombone.net
2019-01-24T23:35:32.021794Z
0 likes, 1 repeats
@natecull @grainloom Generating more javascript apps seems like a bad idea. If you do have to do it then please keep the number of dependencies as small as possible and preferably embed their code. The javascript ecosystem with npm and so on is really something unpleasant, but a reality of the current web.
(DIR) Post #3341763 by mansr@society.oftrolls.com
2019-01-24T23:42:37Z
0 likes, 0 repeats
@grainloom @natecull Did I mention Matlab?
(DIR) Post #3341779 by grainloom@cybre.space
2019-01-24T23:43:10Z
0 likes, 0 repeats
@natecull @drzaiusx11 I know I talk about Plan 9 and Acme a lot but... this is kinda possible with Acme imho? well, most of it.it's an editor, check, not a database but could be the interface for one, is not a GUI but if one were to make a GUI as a directory hierarchy in Plan 9, it could manage the GUI (eg. echo 'my game' > /mnt/widgets/root/properties/title)
(DIR) Post #3341785 by grainloom@cybre.space
2019-01-24T23:43:21Z
0 likes, 0 repeats
@natecull @drzaiusx11 annd win(1) is a very nice interface for REPLs imho that one can extend if one wishes to (and the REPL could also serve its own file system)(and auto-complete seems to be possible: https://github.com/fhs/acme-lsp/)
(DIR) Post #3341911 by grainloom@cybre.space
2019-01-24T23:47:54Z
0 likes, 0 repeats
@mansr @natecull since it's closed source I would avoid it....ok technically so is OpenGenera but you do get the whole OS source code with itthere was a good blog post about why Matlab being closed is bad but I can't find it rn. it was by someone on fedi.... I think a biologist....the core point is that it being closed makes it hard to verify and reproduce research created with it
(DIR) Post #3342027 by drzaiusx11@mastodon.social
2019-01-24T23:52:39Z
0 likes, 0 repeats
@grainloom@natecull Squeek OS was basically a fully inspectable/interactive GUI OS. You could click on any element you could see on the screen and view and manipulate its object properties at runtime.
(DIR) Post #3342109 by drzaiusx11@mastodon.social
2019-01-24T23:53:12Z
0 likes, 0 repeats
@grainloom @natecullI remember the first time I opened a Tetris-like game on Squeek OS, I clicked a tetrino block and it had a property called gravity so I changed it to be negative. The block immediately started gravitating to the top of the screen instead of the bottom. EVERYTHING in the OS was like that.I guess it never caught on, but it was wild.
(DIR) Post #3342110 by grainloom@cybre.space
2019-01-24T23:56:22Z
0 likes, 0 repeats
@drzaiusx11 @natecull the problem with that is performance, having lots of objects all with their own dynamic properties (hecc, just having objects) can be bad for the cache (it's why people in gamedev came up with the ECS)you also give up inlining of objects
(DIR) Post #3342180 by grainloom@cybre.space
2019-01-24T23:58:48Z
0 likes, 0 repeats
@drzaiusx11 @natecull buuut i guess you could have the ECS be the objectt..... ehhhh
(DIR) Post #3342188 by drzaiusx11@mastodon.social
2019-01-24T23:59:06Z
0 likes, 0 repeats
@grainloom @natecull I mean at this day in age do we really are about performance when most desktop apps are just entire browsers bundled with some static js and CSS files? Slack, vscode, etc.
(DIR) Post #3342285 by grainloom@cybre.space
2019-01-25T00:02:26Z
0 likes, 0 repeats
@drzaiusx11 @natecull yes, good developers do, but I guess I can't stop the bad devs from fucking over poor people with slower computers
(DIR) Post #3342308 by mdhughes@cybre.space
2019-01-25T00:04:22Z
0 likes, 0 repeats
@natecull I keep telling you, IDLE is the solution. Shell's not equipped to do interactive Python, but IDLE lets you go anywhere in history and edit, and easily copy into a script for saving.
(DIR) Post #3342422 by grainloom@cybre.space
2019-01-25T00:09:21Z
0 likes, 0 repeats
@drzaiusx11 @natecull (also remember that you'd have to make the debugger work with multithreaded code)
(DIR) Post #3342424 by mansr@society.oftrolls.com
2019-01-25T00:09:21Z
0 likes, 0 repeats
@grainloom @natecull GNU Octave is a very good open source clone. I agree that closed source has downsides, but that's a bit beside the point here.
(DIR) Post #3342481 by grainloom@cybre.space
2019-01-25T00:12:18Z
0 likes, 0 repeats
@natecull btw what do you think of REPLs like the one in Haskell?
(DIR) Post #3342499 by grainloom@cybre.space
2019-01-25T00:13:15Z
0 likes, 0 repeats
@mdhughes @natecull ((so does an Acme win shell as long as you don't clear the window))
(DIR) Post #3342519 by grainloom@cybre.space
2019-01-25T00:13:58Z
0 likes, 0 repeats
@mdhughes @natecull ((probably also true for Emacs if you're into that kind of thing))
(DIR) Post #3342607 by drzaiusx11@mastodon.social
2019-01-25T00:18:01Z
0 likes, 0 repeats
@grainloom @natecull I wouldn't go so far to say that anyone that uses electron is a "bad" dev. It's just a quick way to convert your webshit into an "app" you can ship with little to no effort. Sadly performance is an afterthought. That said vscode runs surprisingly well for what it is.
(DIR) Post #3342760 by grainloom@cybre.space
2019-01-25T00:25:33Z
0 likes, 0 repeats
@drzaiusx11 @natecull s/anyone/everyone/ and I'll agree.... it's good software in their view because they can run iti can't, so I think it's bad softwareand imho it's the opinion of the user that should count(and performance is just one aspect, making users buy unnecessary new hardware generates a lot of waste)
(DIR) Post #3342968 by drzaiusx11@mastodon.social
2019-01-25T00:34:59Z
0 likes, 0 repeats
@grainloom@natecull I totally agree on the disposable computing front. I say this typing from a 3+yo discount bin Android phone.Developers really should do all their development on and target the average to below average consumer device. Anything else is just punishment for the majority of users.
(DIR) Post #3343339 by natecull@mastodon.social
2019-01-25T00:54:03Z
0 likes, 0 repeats
@grainloom I do my best to avoid Haskell so I have no idea. I'm impressed that it even HAS a REPL! Doesn't the mere existence of one violate type safety?
(DIR) Post #3343365 by natecull@mastodon.social
2019-01-25T00:55:16Z
0 likes, 0 repeats
@mdhughes And I keep saying Python is the *problem*, not the solution. For me.Whitespace. Whitespace is the enemy when you are copying and pasting.And I like copying and pasting. Without copy-paste, a REPL is useless. (At leat when, for example, what you are using it for is 'analyze Chinese characters copy/pasted from other places).
(DIR) Post #3343403 by grainloom@cybre.space
2019-01-25T00:57:16Z
0 likes, 0 repeats
@natecull not if you can only evaluate constant expressionsbut there seems to be a trick to do live-reloads with it so, that's interesting....but it does have state, you can assign things to variables and stuff
(DIR) Post #3343428 by mdhughes@cybre.space
2019-01-25T00:58:52Z
0 likes, 0 repeats
@natecull Copy-paste works fine with whitespace, it never fails unless you use a broken REPL.
(DIR) Post #3343521 by grainloom@cybre.space
2019-01-25T01:01:53Z
1 likes, 0 repeats
@natecull I've also been doing some scraping-y stuff (downloading uni course times and processing them into a nice (custom (hooray for NIH!)) tsv format) using mkfilesthe individual "build" steps are developed in Acme and then assembled into the mkfilesit's a nice middle ground between a repl and building and rerunning the whole program on every change, since the results of immediate steps are saved and reusable
(DIR) Post #3343576 by natecull@mastodon.social
2019-01-25T01:04:01Z
0 likes, 0 repeats
@mdhughes But *correctly locating your cursor within the whitespace* is the part which is much, much harder with whitespace.Trust me. Whitespace is *not* my friend in a REPL.I am the one who is using my computer, so I get to tell you how it feels for me to use it.
(DIR) Post #3343769 by grainloom@cybre.space
2019-01-25T01:13:40Z
0 likes, 0 repeats
@natecull tbh I've never actually done anything stateful in Haskell so there might be more ways it can do state that I don't know about...
(DIR) Post #3358966 by rysiek@mastodon.social
2019-01-24T21:40:23Z
0 likes, 1 repeats
People, we've lost @natecull to the Node. Peace be upon him.