Post ACxuejNaPSpbMs9zSi by x@social.skiqqy.xyz
 (DIR) More posts by x@social.skiqqy.xyz
 (DIR) Post #ACx25wCrKfZXUR6S0G by rubrica@stereophonic.space
       2021-11-01T02:20:35.291172Z
       
       4 likes, 1 repeats
       
       Hi gents, I just joined. I've been doing lots of programming in Python and Ruby lately, with some beginner-level C in the mix as well. If anyone has suggestions on what to branch out to in order to expand my skillset (maybe something functional?), then I'd love to hear them.
       
 (DIR) Post #ACx27fclxGsUdn39kW by newt@stereophonic.space
       2021-11-01T08:19:42.848085Z
       
       1 likes, 0 repeats
       
       @rubrica ohai there! Welcome to stereophonic.space! :akkohi2:
       
 (DIR) Post #ACx2bJemC8aXCG7i3E by captainepoch@stereophonic.space
       2021-11-01T08:23:55.495666Z
       
       0 likes, 0 repeats
       
       @newt @rubrica yelou!I'm going to take advantage to tell you that you should learn some Java and Kotlin, and Lisp :blobsalute:
       
 (DIR) Post #ACx2bKCSAvWishsbXk by newt@stereophonic.space
       2021-11-01T08:25:02.828071Z
       
       0 likes, 0 repeats
       
       @captainepoch @rubrica I agree! Except for Java. Or Kotlin. Or Lisp :comfyjoy: Scheme is nice tho.
       
 (DIR) Post #ACx2nDK3ZSWN1i6aDQ by captainepoch@stereophonic.space
       2021-11-01T08:26:06.894043Z
       
       0 likes, 0 repeats
       
       @newt @rubrica Don't listen to him, he hates Java (or any JVM language) for some unknown reason.Also, learn Go :go:
       
 (DIR) Post #ACx2nDqfcCboerMd3A by newt@stereophonic.space
       2021-11-01T08:27:00.588090Z
       
       2 likes, 0 repeats
       
       @captainepoch @rubrica that’s because JVM is cancer filled with cancer! :comfyrage: And also Oracle are a bunch of cunts.
       
 (DIR) Post #ACxFMH0f3LD430W7yy by captainepoch@stereophonic.space
       2021-11-01T10:41:45.653894Z
       
       1 likes, 0 repeats
       
       @newt @rubrica Too much unnecessary hate towards Java :cry_konata:
       
 (DIR) Post #ACxFMHXd4la5hFwSMy by newt@stereophonic.space
       2021-11-01T10:48:00.683748Z
       
       2 likes, 0 repeats
       
       @captainepoch @rubrica there’s no such thing as too much hate towards Java :comfyjoy:
       
 (DIR) Post #ACxG15yMzcFjgpuXIm by captainepoch@stereophonic.space
       2021-11-01T10:53:52.609036Z
       
       1 likes, 0 repeats
       
       @newt @rubrica Your words are like a NullPointerException to me :bloblaugh:
       
 (DIR) Post #ACxG16UH4zm1Hmq120 by newt@stereophonic.space
       2021-11-01T10:55:24.297273Z
       
       1 likes, 0 repeats
       
       @captainepoch @rubrica do you mean, I point that something is wrong with your code, but you are so accustomed to bugs that you don’t even notice? :comfysmirk:
       
 (DIR) Post #ACxGF1RGe99DgN4Ieu by captainepoch@stereophonic.space
       2021-11-01T10:57:40.544197Z
       
       2 likes, 0 repeats
       
       @newt @rubrica I could have things wrong in my code in Java, Kotlin, Python, Go, C, you name the language, it doesn't mean you hate Java just because your favourite IRC Top OP likes Java :sadgery:
       
 (DIR) Post #ACxHZVnPaZVhZylCAy by socjuswiz@gleasonator.com
       2021-11-01T11:03:36.288146Z
       
       1 likes, 0 repeats
       
       @newt @captainepoch @rubrica Honestly I think Java is a pretty fine language. It's designed in such a coherent way, you don't see it in many other languages.I've worked with Objective-C before. Absolute fucking hell compared to Java.What's sorely missing in Java are asyncs of some sort, like async/await in JS.+1 for Scheme by the way.For pedagogic purposes, Scheme is priceless, and some of the implementations allow you to write quite some practical software in it as well.I'm personally a GNU fanboy so for me it'd be Guile. :blobcatmeltthumbsup:
       
 (DIR) Post #ACxJuFWhTQKv6rxZ20 by captainepoch@stereophonic.space
       2021-11-01T11:11:23.704237Z
       
       1 likes, 0 repeats
       
       @socjuswiz @newt @rubrica The problem with Java is that there are a lot of horrible programmers that don't know how to properly use the language, hence the problems with memory and NullPointerExceptions and that kind of things.If you learn how to do stuff properly, Java is good enough for almost anything.In Android, Java is good, Kotlin is better. And Kotlin is aiming to become a defacto language sometime.
       
 (DIR) Post #ACxS7csGmFT2v5wDh2 by newt@stereophonic.space
       2021-11-01T13:11:01.355853Z
       
       5 likes, 2 repeats
       
       @socjuswiz @captainepoch @rubrica every time someone writes how Java is fine, I remember this gem and giggle :akkogiggle: And there is a lot more bombs like this hidden in Java just waiting to explode.
       
 (DIR) Post #ACxTLo77swfvmsDH4C by newt@stereophonic.space
       2021-11-01T13:24:47.161136Z
       
       3 likes, 0 repeats
       
       @captainepoch @socjuswiz @rubrica the problem with Java is that it is made by the enterprise people for the enterprise people, and therefore encourages creating the same kind of programs. I don't even know any other language where I would need to know what the unholy fuck something like AbstractSingletonBeanFactory even is, much less need to memorize it.Java terribly lacks expressiveness. Instead, most Java programmers rely on memorizing endless patterns upon patterns. In other languages, these would be either abstracted away as libraries or made into the language itself (or both). With Java, you get asked how to write a pattern on an interview. The other exception here would be C++, but C++ sucks horribly too.This unfortunate peculiarity in turn makes Java impossible to write in anything but huge and clunky IDEs like IntelliJ or Eclipse, which only ruins the experience. Most of my friends who write in C, C++, or even Haskell use vim/emacs/vscode and some plugins. And most of them can be just as productive with just a bare editor and a compiler, while those bells and whistles just make experience slightly more pleasant. I don't know a single person who would use a simple editor for writing Java.
       
 (DIR) Post #ACxWdkzuVhLDCH5Ysy by genmaicha@stereophonic.space
       2021-11-01T14:01:40.733291Z
       
       1 likes, 0 repeats
       
       @rubrica you should learn common lisp and haskell, and also keep going with C
       
 (DIR) Post #ACxXtqvOLCl4AQDK52 by velartrill@social.ignis.link
       2021-11-01T14:15:48.191754Z
       
       1 likes, 0 repeats
       
       @genmaicha @rubrica oh god no anything but haskell. i second C tho. also fortran if you expect to be doing any work in the HPC areaocaml and chicken scheme are very different but both quite expressive functional programming languages. lua isn't exactly "functional-oriented" but you can use most functional techniques in it perfectly comfortably, and it's very widely used as an extension language. (as a bonus it's very simple and pretty pleasant to use).i recommend staying far away from pure functional languages like haskell (or god forbid agda), they're built with weird academic abstractions in mind rather than tasks programmers actually need to accomplish, and the impedance mismatch ends up being enormous. impure gives you the best of both worlds.terra is a new systems programming language that doesn't have a lot of buy-in yet but it's unquestionably the most expressive systems language out there and i recommend it to everyone in hopes more people will start using it lol.perl is a grody old monstrosity but there's so much old software written in it that it's useful to know all the same.i also always encourage people to spend a little bit of time studying basic assembly for whatever arches they code for routinely. there's no need to be able to write complex software in asm but it's very VERY valuable to have some idea of how syscalls work and how low-level languages like C map onto the bare metal; ime it will save you a lot of pain in the long run.beware of anyone who recommends rust, it's a cult with more technical debt than the Adeptus Mechanicus and it's all going to go down in flames eventuallyanyway hopefully some of that info is of use!
       
 (DIR) Post #ACxsLYQUi1bDzGFT3g by socjuswiz@gleasonator.com
       2021-11-01T17:21:48.470713Z
       
       0 likes, 0 repeats
       
       @newt @captainepoch @rubrica Definitely true that I wouldn't want to write Java without an IDE, but if you work professionally on big projects then IMO you'll want a good IDE regardless of the language being used.And using C without static analysis is a kind of hell in its own right, isn't it? (I never wrote big amounts of C, only tiny utilities.)
       
 (DIR) Post #ACxsLYyWfUozgoAe6S by newt@stereophonic.space
       2021-11-01T18:04:52.010068Z
       
       2 likes, 0 repeats
       
       @socjuswiz @captainepoch @rubrica bruh… Linux kernel devs use either vim or something equally lightweight. Wanna know why? Because if you stick Linux into something like Clion, it’s gonna eat up upwards of 150G RAM. Yes, people tried this :comfyjoy:
       
 (DIR) Post #ACxscmnSX8YXTlCt84 by p@freespeechextremist.com
       2021-11-01T18:08:02.234661Z
       
       1 likes, 0 repeats
       
       @newt @captainepoch @rubrica The main Linux Kernel dev uses a privately maintained fork of uemacs:  https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git/
       
 (DIR) Post #ACxtSbHIbYwIoRs4Zs by x@social.skiqqy.xyz
       2021-11-01T18:17:02.971668Z
       
       2 likes, 0 repeats
       
       @newt @captainepoch @rubrica @socjuswiz Literally what you said here hit the nail on the head, in the day I am a Java dev, and working inside vim is actual hell, but in my free time when working on my private projects (typically in C) I can use vim with no problem, and often notice a performance increase
       
 (DIR) Post #ACxta5tdAJIlnhNEkC by p@freespeechextremist.com
       2021-11-01T18:18:45.340838Z
       
       2 likes, 0 repeats
       
       @rubrica C's great to learn.I think Forth and Scheme (I recommend using Racket) are both well worth the time.  K is really cool.  Erlang's great for FP stuff as well as CSP.  If you pick up some assembly (I'm a big fan of ARM) then C and Forth will start to click in a way they didn't before, which is expected, but it'll also make higher-level languages click, too.  Lua's pleasant but not especially mind-expanding.There are also a lot of little languages that are not especially deep, but if you spend about 30 minutes learning them, they will be immediately useful.  Tk and awk fit there.
       
 (DIR) Post #ACxtd2VAF7Sy8oKmW0 by numberonedonaldtrumpfan@freespeechextremist.com
       2021-11-01T18:19:17.283009Z
       
       0 likes, 0 repeats
       
       @p @newt @captainepoch @rubrica nerd
       
 (DIR) Post #ACxto3vhH3W5kt07CC by x@social.skiqqy.xyz
       2021-11-01T18:21:15.109343Z
       
       1 likes, 0 repeats
       
       @p @rubrica imho all programmers should learn C, gives you very very solid foundations.A good C programmer can pick up any other lang with ease, I dont think the inverse typically holdsBut thats just my hot take
       
 (DIR) Post #ACxtwsNvZAWQYYPN0C by newt@stereophonic.space
       2021-11-01T18:22:50.637690Z
       
       1 likes, 0 repeats
       
       @velartrill @genmaicha @rubrica Haskell is fine. A lot better than OCaml, for that matter :comfyjoy:
       
 (DIR) Post #ACxtxVVO7Mf9szCNXs by x@social.skiqqy.xyz
       2021-11-01T18:22:53.968860Z
       
       1 likes, 0 repeats
       
       @newt @socjuswiz @captainepoch @rubrica pov: you are a java dev
       
 (DIR) Post #ACxtz5ucF94Z5bkuTQ by sullybiker@sully.site
       2021-11-01T18:23:13Z
       
       1 likes, 0 repeats
       
       @newt @socjuswiz @captainepoch @rubrica Explain to a moron like me how that has happened. Why's it doing that?
       
 (DIR) Post #ACxu1d8XgaV0iGTkTg by pomstan@xn--p1abe3d.xn--80asehdb
       2021-11-01T18:23:43.512009Z
       
       2 likes, 0 repeats
       
       @newt @socjuswiz @captainepoch @rubrica interning small and frequently used objects is not an exclusive java feature
       
 (DIR) Post #ACxu5H93OPC3fISLeS by MercurialBlack@leafposter.club
       2021-11-01T18:24:22.802167Z
       
       1 likes, 0 repeats
       
       @newt @socjuswiz @captainepoch @rubrica how the hell does that work?
       
 (DIR) Post #ACxu7BCgSCD7oj3ugy by newt@stereophonic.space
       2021-11-01T18:24:40.985835Z
       
       2 likes, 0 repeats
       
       @sullybiker @captainepoch @rubrica @socjuswiz long story short, for Integers between -128 and 127 JVM creates static objects and caches them in RAM. So, for a and b, this code gives out True because Java is retarded and == compares pointers :comfygeek:
       
 (DIR) Post #ACxuD1TBYaVLMjZCfg by sullybiker@sully.site
       2021-11-01T18:25:44Z
       
       2 likes, 0 repeats
       
       @newt @socjuswiz @captainepoch @rubrica Thanks! That seems like a bit of a pitfall.
       
 (DIR) Post #ACxuDUznmOpGwI3A2K by newt@stereophonic.space
       2021-11-01T18:25:50.446755Z
       
       1 likes, 0 repeats
       
       @pomstan @rubrica @socjuswiz @captainepoch no, but having == compare pointers instead of objects themselves is exclusively Javaesque thing (I know about lisps, yes).
       
 (DIR) Post #ACxuEQICkePmds6A8O by p@freespeechextremist.com
       2021-11-01T18:26:02.655359Z
       
       2 likes, 0 repeats
       
       @x @rubrica I've got a theory that the three big branches of computing are C, Forth, and Scheme, maybe APL.  (Not in the sense of history, but in the sense that these languages are the base elements.)  If you wrap your head around those three languages, every other language starts to look like a mixture of concepts from them.
       
 (DIR) Post #ACxuGx33wAaaoNDmpU by newt@stereophonic.space
       2021-11-01T18:26:28.100846Z
       
       1 likes, 0 repeats
       
       @MercurialBlack @socjuswiz @rubrica @captainepoch https://stereophonic.space/notice/ACxu6tM1A5CLaZ9DXc
       
 (DIR) Post #ACxuJfNQ62hCsA2Psu by ItsAllToast@poa.st
       2021-11-01T18:26:58.684150Z
       
       1 likes, 0 repeats
       
       @p @x @rubrica dang it you're making me miss Pascal, you devil.
       
 (DIR) Post #ACxuRGEVSqQTCuURsm by MercurialBlack@leafposter.club
       2021-11-01T18:28:21.497332Z
       
       0 likes, 0 repeats
       
       @newt @captainepoch @rubrica @socjuswiz >Using == to compare pointersDoes it have something similar to Python, where "is" checks if it's the same object, but ==" checks for equality?
       
 (DIR) Post #ACxuWAhPSyB3UaLp8i by MercurialBlack@leafposter.club
       2021-11-01T18:29:14.721906Z
       
       1 likes, 0 repeats
       
       @newt @captainepoch @rubrica @socjuswiz >Using == to compare pointersDoes it have something similar to Python, where "is" checks if it's the same object, but "==" checks for equality?
       
 (DIR) Post #ACxuejNaPSpbMs9zSi by x@social.skiqqy.xyz
       2021-11-01T18:30:46.168640Z
       
       1 likes, 0 repeats
       
       @p @rubrica I haven't personally played around with those langs, so I cant comment to much.With that being said, after doing short research i can see why you would draw that conclusion
       
 (DIR) Post #ACxus95c8Coas49NxY by newt@stereophonic.space
       2021-11-01T18:33:10.707910Z
       
       1 likes, 0 repeats
       
       @MercurialBlack @socjuswiz @captainepoch @rubrica yeah, in Java the Object superclass (every object class is its descendend) has .equals() method that you can override.The mess with == is due two Java having effectively two kinds of types. There are primitive types (int, bool, char, etc) and there are object types (or classes). And they must be treated slightly differently. For two ints, 1000 == 1000 without any issues. For two Integers, this is not the case.
       
 (DIR) Post #ACxvCD4v0jQD29OOaO by p@freespeechextremist.com
       2021-11-01T18:36:50.958671Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @rubrica @x I never used Pascal, personally.  It was out of style when I started learning, but I was always interested in history.  I think the good parts made their way out of the language and into Limbo/Go/etc. either directly or by way of Oberon.  (For all of the flame wars between the adherents, most of the researchers and language designers were very interested in each other's work and there was a lot of cross-pollination, but you probably know that if you've written Pascal.)In the 3-or-maybe-4-elemental model described above, Pascal is a degenerate form of C.  :dmr:  (Go would be a degenerate form of C with a 1-2% Scheme impurity; not necessarily a bad thing, the same way carbonized steel isn't a bad thing.)
       
 (DIR) Post #ACxvJJc76vPnKWJ7Pk by ItsAllToast@poa.st
       2021-11-01T18:38:06.575681Z
       
       2 likes, 0 repeats
       
       @p @rubrica @x I think Pascal descends from APL but I could be wrong.But yeah Pascal is what we all learned way back in the dark ages before the braindead schools switched everyone to Java.
       
 (DIR) Post #ACxveCmVhyCKDm8CuW by p@freespeechextremist.com
       2021-11-01T18:41:54.526414Z
       
       2 likes, 0 repeats
       
       @x @rubrica Oh, you should give them some time, play around.  There are very few languages that make the light bulb go off the same way.  Racket is maybe the best way to learn Scheme, and I think jonesFORTH is the best way to make Forth click.  (Start with jonesforth.S, then jonesforth.f.  Great way to spend a day some weekend.)jonesforth.Sjonesforth.f
       
 (DIR) Post #ACxvns6PRn1wyx33aa by x@social.skiqqy.xyz
       2021-11-01T18:43:37.578913Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @p @rubrica personally when I was in hs we got taught delphi (which is a bastardization of pascal)Looking back i would have preferred C or Java, C would have shrunk the class size sooner
       
 (DIR) Post #ACxvqHpEmSQDL8ASeG by x@social.skiqqy.xyz
       2021-11-01T18:44:04.481307Z
       
       1 likes, 0 repeats
       
       @p @rubrica i shall put this on my todo, thanks for sharing!
       
 (DIR) Post #ACxvvjeyih377By2aG by ItsAllToast@poa.st
       2021-11-01T18:45:03.647838Z
       
       3 likes, 0 repeats
       
       @x @p @rubrica Nice - and true!I had a CS 300 class at the college I went to (taught with C++) and the instructor (dean of the CS department) in the first class grilled everyone in class the first day asking about data structures and pointers and all the hard things about the language, and actually forced an "like, ohmygosh" level girl out of the class for not knowing enough to actually be in the class.  It was one of my proudest CS moments.
       
 (DIR) Post #ACxw0qPL3jtXUU5WiW by p@freespeechextremist.com
       2021-11-01T18:46:00.015918Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @rubrica @x > I think Pascal descends from APL but I could be wrong.It's ALGOL if we're talking history, but that's what I meant by "Not in the sense of history, but in the sense that these languages are the base elements."  (Aluminum was always there, but it was discovered long after bauxite.)  Like minimal but distinct sets of concepts.
       
 (DIR) Post #ACxw71XOaiuZkNnrwu by ItsAllToast@poa.st
       2021-11-01T18:47:06.098674Z
       
       1 likes, 0 repeats
       
       @p @rubrica @x Ah right, I always mix those two up (the US Navy standardized on APL at one point in history because it was "the most perfect computer language that was ever created," and for some reason in my addled mind I've always associated that statement with Pascal).
       
 (DIR) Post #ACxwCc4KCGq4Uhs3JQ by p@freespeechextremist.com
       2021-11-01T18:48:07.630871Z
       
       1 likes, 0 repeats
       
       @x @rubrica Don't open the file if you have anything time-sensitive to do that day; you won't be able to stop once you start.  Conditionals and loops are written *in* Forth.
       
 (DIR) Post #ACxwD01J98gamIdywS by x@social.skiqqy.xyz
       2021-11-01T18:48:10.006400Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @p @rubrica I hate to sound like a gatekeeper, but imho it would be good for CS in general if this was the approachIt would allow students to hit deeper concepts sooner in their academic careerThe problems nowadays are unis are pumping out "stackoverflow" devs as i have taken to calling themI forsee a possible problem in the future, you can actually see it already. The problem being *really* shit code --> low performance.The only way to fix this is at the source imo/rant
       
 (DIR) Post #ACxwI8f0RvOJ1VfAy8 by ItsAllToast@poa.st
       2021-11-01T18:49:06.570069Z
       
       4 likes, 1 repeats
       
       @x @p @rubrica Exclusionism is literally the core concept that made the entire western University system work, now that we've dumbed everything down for any moron to "participate in" (but not excel at), our future has become doomed.
       
 (DIR) Post #ACxwL9bFPgUqo0LJZY by MercurialBlack@leafposter.club
       2021-11-01T18:49:39.697765Z
       
       0 likes, 0 repeats
       
       @newt @captainepoch @rubrica @socjuswiz ah, right.  I've worked a bit with Java, but haven't dealt extensively with the capital-letter versions of the classes.
       
 (DIR) Post #ACxwOaepGmv5amegDo by pomstan@xn--p1abe3d.xn--80asehdb
       2021-11-01T18:50:17.071621Z
       
       0 likes, 0 repeats
       
       @MercurialBlack @newt @captainepoch @rubrica @socjuswiz https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html#equals(java.lang.Object)
       
 (DIR) Post #ACxwRhTUNdWpbVpqqW by p@freespeechextremist.com
       2021-11-01T18:50:51.228742Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @rubrica @x> the US Navy standardized on APL at one pointI think that's ALGOL-68 again, possibly Ada.
       
 (DIR) Post #ACxwSFWrlaQrDpg1pY by x@social.skiqqy.xyz
       2021-11-01T18:50:55.519083Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @p @rubrica very much this.Not everyone can get a degree (this is not at insult, its just a fact).So why is the "standard" go to uni, get a degree*puts tinfoil hat on*I think its bc the banks want people hopelessly indebted to them
       
 (DIR) Post #ACxwZVX6fA0SstFZgG by ItsAllToast@poa.st
       2021-11-01T18:52:14.900240Z
       
       2 likes, 0 repeats
       
       @p @rubrica @x Don't mind me, I'm just a confused old doddering 1950s anime man.
       
 (DIR) Post #ACxwfZWkj18V0fybKa by x@social.skiqqy.xyz
       2021-11-01T18:53:21.081771Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @p @rubrica pov: the nurses at an old age home lost a patient again
       
 (DIR) Post #ACxwjp36xOI2JC8emW by ItsAllToast@poa.st
       2021-11-01T18:54:06.791820Z
       
       2 likes, 0 repeats
       
       @x @p @rubrica >banks
       
 (DIR) Post #ACxwvU98UzhexFWB3A by x@social.skiqqy.xyz
       2021-11-01T18:56:12.502119Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @p @rubrica Student: I would like to take out a loan so i can studyBank: Ofc we can help you, out of interest what are you studyingStudent: I'm glad you asked, i am studying <insert random ultra liberal degree about gender #145219>Bank: <we got another one bois>
       
 (DIR) Post #ACxx8yt7VtDs3xShn6 by ItsAllToast@poa.st
       2021-11-01T18:58:39.658329Z
       
       0 likes, 0 repeats
       
       @x @p @rubrica Student loans were made undischargable by bankruptcy courts, aren't they all issued by a Federal "corporation" at this point?  (Not that the banks are owned by a different ethnic group than the Federal government...)
       
 (DIR) Post #ACxxKbgdbKdxa2APw0 by p@freespeechextremist.com
       2021-11-01T19:00:46.612320Z
       
       13 likes, 5 repeats
       
       @ItsAllToast @x @rubrica If it's impossible for a discussion about programming languages to avoid veering into politics, then Trotsky has won and you are basically a communist.  Seriously, the "all roads lead back to politics" mindset, it's a symptom of Stage-IV meme cancer, you have to undergo extensive meme chemo.(But also fuck banks.)compassbanks.png
       
 (DIR) Post #ACxxMrwm7IjmacnHWa by x@social.skiqqy.xyz
       2021-11-01T19:01:09.398071Z
       
       0 likes, 0 repeats
       
       @ItsAllToast @p @rubrica I'm not merican' so I have no idea how loans/debt work there tbh> undischargable by bankruptcy courtsI assume this means, you cannot declare bankruptcy and then have your student debt wiped as a resultif thats a case, then I 100% believe its a scam to "cash in on the idiots"
       
 (DIR) Post #ACxxfoa2rFiheOCDj6 by ItsAllToast@poa.st
       2021-11-01T19:04:35.600000Z
       
       1 likes, 0 repeats
       
       @p @rubrica @x Just following the thread of the conversation I guess?I do enjoy talking about programming languages, don't get me wrong!
       
 (DIR) Post #ACxxr5SmQcF5CHAmwq by x@social.skiqqy.xyz
       2021-11-01T19:06:37.019133Z
       
       1 likes, 0 repeats
       
       @ItsAllToast @p @rubrica I think it more wentprog langs -> good starting langs -> weed out dumbo's -> unis and dumbos -> me going schizo mode on banks -> gif -> fuck banks gifI dunno where the politics is lol
       
 (DIR) Post #ACxzETCsPt7hS0Rq9Q by Binkle@kiwifarms.cc
       2021-11-01T19:22:04.365592Z
       
       1 likes, 0 repeats
       
       @rubrica learn a lisp dialect and contemplate programming the AST directly
       
 (DIR) Post #ACxzQc5TDzcOT5m3eK by velartrill@social.ignis.link
       2021-11-01T19:24:15.429963Z
       
       1 likes, 0 repeats
       
       @newt @genmaicha @rubrica if you love monads so much why don't you marry one
       
 (DIR) Post #ACxzX1QnuPZcoDoCWG by newt@stereophonic.space
       2021-11-01T19:25:22.715660Z
       
       0 likes, 0 repeats
       
       @velartrill @rubrica @genmaicha my gonads are not for monads :comfyxd: These days you have monads everywhere. Async/await has monadic interface in virtually every language.
       
 (DIR) Post #ACy0x3iw6l7rP0GkXg by p@freespeechextremist.com
       2021-11-01T19:41:20.474172Z
       
       3 likes, 1 repeats
       
       @ItsAllToast @rubrica @x Not really you specifically, just this subthread seemed to be headed in that direction and "the personal is political" is the current iteration of Marx's historical-materialist concept that every action undertaken by a living thing is part of the class struggle, either participating directly or as a consequence of class struggle, to the extent that he died believing that Darwin's theory would be replaced with a theory that evolution was guided by class struggle (which is the seed that sprouted into Lysenkoism, and several other forms of pernicious shrubbery).  The primacy of the state, even under various anti-communist movements (including fascism, true story:  in Mussolini's last interview before his assassination, he literally said "the USSR is not real socialism"), is Marxist in origin:  even absolute monarchs had to claim divine right to rule, as they were understood to be subservient to one god or another, from pharoahs to Louis XIV.  Marx ended that and now there are dancing rabbis in this thread about what programming languages are good to learn.So it irks me a bit when every conversation turns into a discussion of politics; it strikes me as a regression, the speaker rejecting their own humanity.  Maybe I'm overly sensitive to it, but it seems very rare to be able to discuss something on the internet dot com without having to hear someone complain about their pet political bogeyman, the monocausal source of all of the world's greatest evils, the Jews/Nazis/communists/fascists/Marxists/whites/blacks/Mexicans/Biden/Trump/atheists/Christians/capitalists/Chinese/Muslims/Israelis/Saudis/Palestinians/Americans/British royal family/colonialists/gays/whoever.Anyway, don't mind me, but I would like to be untagged if you guys will be talking about that stuff, I was happy to participate in a discussion of programming languages.  If there is no term that means "suicidal boredom when faced with the prospect of hearing a slogan", I may have to try to coin one.
       
 (DIR) Post #ACy1PDZl4XE849P4ds by ItsAllToast@poa.st
       2021-11-01T19:46:25.051886Z
       
       2 likes, 0 repeats
       
       @p @rubrica @x Hey, thanks for being patient with us so far!  You know I'm always good for a plain old tech convo and will definitely hop in on the next one, too! We're all cool.  :cool_dab:
       
 (DIR) Post #ACy4gGjGtu04dDfvlI by socjuswiz@gleasonator.com
       2021-11-01T19:51:11.024805Z
       
       0 likes, 0 repeats
       
       @newt Vim is not exactly lightweight if you ask me. Sure, compared to big boi IDEs like IntelliJ IDEA it's a joke in terms of installation size, but that's mostly just because big IDEs like that will ship whole compilers, standard libraries, etc. with them. If I install Android Studio, I even get qemu as part of the installation.You could get a similar experience as IntelliJ IDEA with a sufficiently sophisticated Vim plugin or Emacs Lisp library. You'll just have to ensure that you install some JDK and tell your self-made IDE where it is.@captainepoch @rubrica
       
 (DIR) Post #ACy4gHDl4YO29lwHHU by newt@stereophonic.space
       2021-11-01T20:23:04.772867Z
       
       0 likes, 0 repeats
       
       @socjuswiz @captainepoch @rubrica in 2021, Vim is probably the most lightweight of any somewhat popular editor out there. Even with plugins, it requires A LOT less ram or storage than something like IntelliJ. And mind you, while you can strap more stuff onto Vim to make it like IntelliJ, you can't shrink IntelliJ down.Not that it terribly matters, because only Java programmers use IntelliJ any way, and they are doomed to suffering due to their poor life choices :comfyxd:
       
 (DIR) Post #ACy4oU1HN3qMAT0zzs by laurel@freespeechextremist.com
       2021-11-01T20:24:36.688648Z
       
       1 likes, 0 repeats
       
       @p @rubrica Is there a reason you recommend Erlang instead of Elixir?Also, which dataflow language would you recommend?That forth tutorial look great btw.
       
 (DIR) Post #ACy4vqdJh1DWKUJoau by socjuswiz@gleasonator.com
       2021-11-01T20:00:02.668486Z
       
       0 likes, 0 repeats
       
       @newt @sullybiker @captainepoch @rubrica Scheme's eq? also compares pointers. (In practice anyway. The standard doesn't talk of pointers but it's obvious what eq? is meant for.) So comparing two numbers with eq? will generally work as long as they fit on stack-allocated values, but stop working once you hit an arbitrary implementation-defined size after which you'll start getting false.This is not an inherent flaw of the language unless you consider any exposition of implementation details for the sake of being able to write efficient code to be a language flaw.(In the screenshot I use 'eval' to disable optimizations that would otherwise turn the whole expression into just "#t" at compile time.)
       
 (DIR) Post #ACy4vrAHiRaXyjk8yu by socjuswiz@gleasonator.com
       2021-11-01T20:23:05.339083Z
       
       0 likes, 0 repeats
       
       @newt @captainepoch @rubrica @sullybiker A little elaboration for anyone curious about equality in Scheme:If you know that you're comparing numbers, you should use '=' which mathematically compares numbers.E.g. (= (expt x y) (expt x y)) will always return true.If you know that you're comparing two values of some other type, there's specialized equality checkers like "string=?", "char=?", and so on that you can use.If you want to check whether two arbitrary values of any type are "the same" i.e. there is no way to distinguish between them save for low-level hacks like "eq?" then you should use the equivalence check "eqv?" which approximates the notion of "operational equivalence." This is useful for instance if you want to implement "memoization" i.e. a procedure that caches any result it produces for any given input value. (You check the input value against previous input values via "eqv?")If you want a lax comparison of list/tree data structures consisting of cons pairs (the fundamental list/tree building block in lisps) then you use the "equal?" procedure.Unlike in most OOP languages, in standard Scheme you unfortunately can't override the meaning of "equal?" on self-defined data types. For instance if you define a record type called "student" which contains the fields "age" and "name" then you can't ever make "equal?" return true for two separate instances of that type even if they hold the same age and name values; you will have to write a custom equality checker.Sophisticated implementations like Guile might actually support some sort of OOP system and define "equal?" in terms of that though, adding that functionality to the language so you can do that after all, but it'll be specific to your Scheme implementation.Ask me Scheme questions any time, I'm a massive Scheme nerd. :ageblobcat:
       
 (DIR) Post #ACy4vrfpp8pFYaVL9s by newt@stereophonic.space
       2021-11-01T20:25:54.532012Z
       
       0 likes, 0 repeats
       
       @socjuswiz @captainepoch @rubrica @sullybiker that kind of sucks, really. Even Java allows for this :comfyxd: OOP isn't even required. All you need is some ad-hoc polymorphism and you're golden.
       
 (DIR) Post #ACy5g1mAb2RYD1ToNU by p@freespeechextremist.com
       2021-11-01T20:34:17.301775Z
       
       2 likes, 0 repeats
       
       @laurel @rubrica > Is there a reason you recommend Erlang instead of Elixir?Mainly that I like Erlang and I do not like Elixir much.  I think they brought too much Ruby with them.  ("If you mix water and brandy, you've ruined two good things.")> Also, which dataflow language would you recommend?I haven't actually done a lot of that; I have played briefly with Verilog and I read some papers on FRP, which is sorta dataflow-y if you squint.> That forth tutorial look great btw.It is endlessly entertaining.
       
 (DIR) Post #ACy5v0mIaZXfSRgX3Y by ceruds@poa.st
       2021-11-01T20:36:58.641807Z
       
       1 likes, 0 repeats
       
       @p @laurel @rubrica Heh, I am currently learning Elixir and Nim. I might come back to Rust once again, but writing Elixir was very good for me since it has a good syntax to me. Nim also has good syntax, but it is not so mature yet unfortunately, but I hope that will change in the future.
       
 (DIR) Post #ACy5wHym7XSj6186yG by socjuswiz@gleasonator.com
       2021-11-01T20:33:48.071211Z
       
       1 likes, 0 repeats
       
       @newt @captainepoch @rubrica @sullybiker Yeah the Scheme standards are notoriously under-powered. Even the R6RS which people called "bloated."R6RS at least added freaking HASH TABLES and SINGLE INHERITANCE (of record types) but guess what, in R7RS-small they yeeted those features out again and are currently still in the process of defining what R7RS-large will include. (I'm a little active in the standardization process. Multiple big implementors of the language lost faith and are not even partaking anymore though.)Imagine not having hash tables in your standard library or the ability to sub-type a record type. Yeah.
       
 (DIR) Post #ACy60FaqvuUmr3pTpw by newt@stereophonic.space
       2021-11-01T20:37:54.194860Z
       
       0 likes, 0 repeats
       
       @socjuswiz @captainepoch @rubrica @sullybiker I mostly see Scheme as a nice compiler backend target. Writing code in it manually would be a nightmare.
       
 (DIR) Post #ACy8jEUk41rEO4Y2Ns by laurel@freespeechextremist.com
       2021-11-01T21:08:28.960819Z
       
       1 likes, 0 repeats
       
       @p @rubrica >too much RubyFor some reason I could never get into Ruby. Perhaps it was the tutorials but it always seemed like you were supposed to memorize a function than learn a way of thinking.I am in the process of learning Elixir and mostly picked it due to streams/pipes support, the polished interpreter/overall environment and the many tutorials available for web programming.
       
 (DIR) Post #ACypcAb8RyKkIrPuoy by p@freespeechextremist.com
       2021-11-02T05:09:01.329324Z
       
       2 likes, 0 repeats
       
       @ceruds @laurel @rubrica Erlang's weakest point is the syntax, I think.@icequinn@blob.cat is a big fan of Nim, if I recall correctly.
       
 (DIR) Post #AD0a7E0uafo6vKBDIe by p@freespeechextremist.com
       2021-11-03T01:24:46.610759Z
       
       1 likes, 0 repeats
       
       @laurel @rubrica > Perhaps it was the tutorials but it always seemed like you were supposed to memorize a function than learn a way of thinking.Sounds like Rails tutorials.  (Maybe Ruby's docs are the same nowadays.  It's been a while since I learned Ruby.)  I do not ever recommend touching Rails if you can possibly avoid it.  It is total shit, it's not even Ruby, it's PHP worked over by Java guys.The best way to learn Ruby if you already know another language is, I think, is to start with some small pieces:  there's an excessive amount of introspection, there are no statements just expressions, and everything is an object, absolutely everything, and anything you want to do with an object is done by passing messages.  The design goals are to be expressive and convenient.  Easy start, right?  Next is lambdas and iterators everywhere, interfaces instead of explicit type-checking, and modules instead of multiple inheritance.Here's the whirlwind, 5-minute tour:  "if" is an expression, it returns a value, it's like cond in Lisp.  Start up irb, that's the REPL, it's a great way to poke at things.  1's an object, calling 1.object_id gives you the object ID (it's a pointer in most cases, except for fixed-size integers and special values like 'true', 'false', 'nil', etc.), calling 1.class gives you the class.  The class is an object.  1.class gives you 'Integer', 1.class.ancestors gives you the inheritance chain.  It's single-inheritance, but there are modules you can mix in.  Classes are objects, '1.class.class' is 'Class'.  You'll see 'Comparable', you can compare Integers:  [1,3,2].sort works, ["a", "c", "b"].sort works.  You can mix 'Comparable' into any class:  define the "<=>" operator that takes another object, returns -1 (other object is greater), 0 (other object is equivalent), or 1 (other object is less).  'Comparable' defines all the other comparison operators in terms of that one:  no magic (except that sometimes things are written in C to speed them up a little), just you can define "<" if you have "<=>" with "def <(other); (self <=> other) == -1; end".  'Enumerable' is another pretty important module:  if you define 'each', you can get 'select'/'map'/'inject' (filter, map, reduce), among others.  'each' takes a block, which is just a lambda with some syntactic sugar applied.  [1, 2, 3].each { |i| puts i } prints every integer in the array.  Filter-map-reduce, like in Lisp, let's sum the squares of the odd numbers:  [1, 2, 3, 4, 5].select { |i| i % 2 == 1 }.map { |i| i ** 2 }.inject(0) { |accumulator,i| accumulator+i }, that evaluates to 35.  You can read 'Enumerable', it's written in Ruby.  You can use lambdas directly, too:  l = lambda{|x| print x}; l.call("Hello, world!\n").  Methods are objects, you get them off the objects by calling the 'method' method with a symbol, then you can treat them like lambdas:  rxmatch = /a.c/.method(:match); puts rxmatch.call("abcdef").  That prints "abc".  There's a lot of introspection, this makes it much easier to get up to speed if you learn just a few of the common ones:  'inspect' returns a human-readable string that describes the object, in the case of common literal values it will often return the literal, in most cases it returns the class name and some details about the object.  (Rails deliberately overrides it to give the wrong class name for a wide variety of objects, so you might think you're dealing with one of the builtin classes, but you're dealing with a special Rails one that behaves differently--it even overrides 'inspect' on some *classes* so that if you type 'obj.class' in the REPL, you will be deceived; this is probably done to punish people that want to fix bugs in web applications.)  The 'methods' method returns a array of method names!  You can use 'map' to turn them into methods.  Calling 'source_location' on a method/lambda/whatever will tell you the file and line number, with the exception of methods written in C, as that information is not available to the runtime.  (This is a great way to tell when Rails has deceived you.  Libraries for doing web gunk should not be written in such a way that the programmer comes to think of them as an adversary.  I'm permanently psychologically scarred by Rails, never touch Rails.)  By convention, there are some common type conversion methods:  to_i for integers, to_f for floats, to_a for arrays, to_s for strings, to_hash for hash tables (associative arrays, dictionaries, maps, whatever your preferred term; the class in Ruby is named 'Hash').  There's a literal syntax for ranges, [0,10] is '0..10' and [0,10) is '0...10'.  You can convert them to arrays, compare '(0..10).to_a' versus '(0...10).to_a'.  The two biggest built-in classes (in terms of method count) are 'String' and 'Array', which is why it's a pretty good language for scripting and web gunk.I think that's enough to give a feel.> I am in the process of learning Elixir and mostly picked it due to streams/pipes supportCool!  Let me know what you think.  I gave my thoughts, once you're up to speed yours would probably be interesting to hear.
       
 (DIR) Post #AD0ew4OcVXmjgFllaK by laurel@freespeechextremist.com
       2021-11-03T02:18:47.158473Z
       
       0 likes, 0 repeats
       
       @p @rubrica >Sounds like Rails tutorials.Wow you really know your languages, that was something like a decade ago but you are probably right that it was a rails tutorial.Many thanks for the very interesting Ruby tour!It took me a while to get through it, but it gives a very nice overview of the language. And I can somewhat understand what you meant by mixing Erlang with Ruby.Also good thing I never used Rails, ended up going with Python and its frameworks Django and Flask. At the time, coming from a long study of assembly, C and C++, Python seemed so extremely practical.> Let me know what you think.I will, although it might be a while. Recently, I read some books on Functional programming and some more books on programming patterns. Naturally, I wanted to practice what I read and a stateless functional language with good concurrency and message passing sounded great. I'm finding out that comparing solutions of one language to another one close to it, such as elixir vs Go vs Erlang, is a very good way to learn albeit slow.
       
 (DIR) Post #AD1kg8CfNXitjovB5c by p@freespeechextremist.com
       2021-11-03T14:57:50.812759Z
       
       0 likes, 0 repeats
       
       @laurel @rubrica > Many thanks for the very interesting Ruby tour!It's a really fun language!> Also good thing I never used Rails, ended up going with Python and its frameworks Django and Flask.I've gazed into that abyss, Rails is really a mess.  Not just that, but even the pared-down "rails-metal" framework incurs about a 59% overhead over using nothing at all on top of bare Rack, and the "rails-api" framework incurs a 93% overhead:  https://github.com/luislavena/bench-micro#requestssec .I hear Django's nice, but I've never played with it.  I've done marginal hacks on Python projects, it's really almost the same language as Ruby beneath the surface.  (I don't know why Guido hates lambdas, though.)> long study of assembly, C and C++Big fan of C to this day.  I think everyone ought to pick up assembly for at least one chip, learn to speak with the machine directly.  (If nothing else, it makes higher-level languages make more sense.)> Naturally, I wanted to practice what I read and a stateless functional language with good concurrency and message passing sounded great.CSP is one of those things that seems really obviously correct in retrospect.  :tonyhoare:  (Maybe it seems that way from absorbing Unix sensibilities, though, or maybe it's the other way around and cheap processes and pipes are why Unix got where it got.)> I'm finding out that comparing solutions of one language to another one close to it, such as elixir vs Go vs Erlang, is a very good way to learn albeit slow.Definitely.  I think it's good to learn a lot of languages, and it gets faster the more of them that you do.
       
 (DIR) Post #AD23D8QHNiz99NAwca by piggo@piggo.space
       2021-11-03T18:25:28.806018Z
       
       2 likes, 0 repeats
       
       @newt I hate the fact I know why it does this and it's actually quite logical and correct if you think in java
       
 (DIR) Post #AD23FGw4haqo8D4CVU by grips@cawfee.club
       2021-11-03T18:25:52.261787Z
       
       2 likes, 0 repeats
       
       @ItsAllToast @p @x @rubrica I've learned Pascal in high school in the dark ages of... 2014-16. from what I've heard, they've recently switched to Python
       
 (DIR) Post #AD23bpTOyOAzcPPYXo by hector@explosion.party
       2021-11-03T18:29:55.372952Z
       
       1 likes, 0 repeats
       
       @rubrica https://nim-lang.org
       
 (DIR) Post #AD26JA1ocpkljHIWSO by x@social.skiqqy.xyz
       2021-11-03T19:00:10.571425Z
       
       2 likes, 0 repeats
       
       @grips @ItsAllToast @p @rubrica personally i'm not a huge fan of students (and i mean hs students) first lang being pythonI have a feeling it can instill bad habitsbut thats just my (schizo) take
       
 (DIR) Post #AD26MUYCmQ40FO2IXg by p@freespeechextremist.com
       2021-11-03T19:00:48.479061Z
       
       2 likes, 0 repeats
       
       @grips @ItsAllToast @rubrica @x The high schools I attended used C++, my teacher said he initially learned on Pascal.Back then, C++ was still backwards-compatible with C.  He used to ding me for using printf() instead of cout, and I used to just take the hit instead of using cout.
       
 (DIR) Post #AD26Qdo2JKQq6uQ4Om by x@social.skiqqy.xyz
       2021-11-03T19:01:31.427360Z
       
       1 likes, 0 repeats
       
       @p @grips @ItsAllToast @rubrica printf supremacy gang unite
       
 (DIR) Post #AD26WsDDf5vkWnAdF2 by p@freespeechextremist.com
       2021-11-03T19:02:41.052923Z
       
       0 likes, 0 repeats
       
       @ceruds @laurel @rubrica > @icequinn@blob.cat is a big fan of Nim, if I recall correctly. bloatfe is playing fedi on easy mode, except that it doesn't autocomplete so you can make a typo when attempting to tag @icedquinn .
       
 (DIR) Post #AD2SDqYjmUpitIZGwC by laurel@freespeechextremist.com
       2021-11-03T23:05:45.360822Z
       
       1 likes, 0 repeats
       
       @p @rubrica >I hear Django's niceAt that time it allowed you to do "web app" programming pretty fast and relatively safe as long as you had an idea of the kind of web vulnerabilities that exist.Also forcing you to work in an MVC framework, which at that time I neither knew what it really was nor that it is such a common pattern, implicitly allows you to program much more complex applications than you would otherwise be able to. Especially combined with a simplified ORM, input sanitizing, and loads of other little things, making the fractured web app programming landscape manageable while learning best practices and being able to directly utilize Python's numerous modules.Flask is very bare bones and allows for very fast setup. You just have a decorator that matches the requested url before the function that handles said request. If you need more functionality you import it through modules.But I'm pretty sure that nowadays there are web frameworks for every language modeled after Django and the choice is more about the programmer's proficiency and taste in the underlying language as long as some level of overall framework quality is preserved.>learn to speak with the machine directly.Programming from the ground up. That was the title of the book that made me really interested in programming, it was an assembly book. Up until then I had only taken some classes on visual basic.C++ was more like a "pass the gauntlet" thing as a learning process, never really enjoyed using it.C is ultra comfy to this day and Kernighan's book is still one of my favorites.
       
 (DIR) Post #ALM21Bc8iMs1vFh1Y8 by laurel@freespeechextremist.com
       2022-07-10T16:43:10.415505Z
       
       1 likes, 0 repeats
       
       @p @rubrica >I am in the process of learning Elixir and mostly picked it due to streams/pipes supportCool! Let me know what you think. I gave my thoughts, once you're up to speed yours would probably be interesting to hear. I am about 25% in Armstrong's "Programming Erlang" (pic 1) book which I'm following along with Elixir language and tools. (excellent book btw as far as concurrency and functional programming goes irrespective of Erlang specifically)I've also followed most of the Go "tour" and read some Go blogposts. >Erlang(or Erlixir)Very happy with it. It is fun to use and makes concurrent programming very enjoyable. Also I really like the accompanying libraries in OTP and how they fit with the design of the language.Even though initially the syntax seems complex (of both Erlang and Elixir) once you understand the paradigms that it uses (such as matching, filters/conditionals, atoms, messaging, concurrency, etc) it is not only very simple to use but also extremely powerful. First time I like list comprehensions so much.I really appreciate the overall design of the language and how every part of it fits together.I don't think Erlang's syntax is that bad, I think it is overall more consistent than Elixir's is. But concerning atoms and binary strings Erlang's syntax is horrible. And you're using atoms all the time making Elixir's approach the superior one.>ElixirVery nice reference, a joy to use. It's also embedded in the REPL which has some very useful commands such as i(info) and h(help). Would be great if they also allowed you to customize ctrl-c to "break".Mediocre to bad books/guides when compared with Armstrong's book and most of Erlang's resources.I find Mix(build tool) very annoying and have avoided using it at all.A community hooked on scripted solutions(is this the ruby on rails legacy?), making it difficult to find your way around the language features even though the features are there. For example, I was trying to find out how to parse cli arguments. There were multiple community posts describing various automatic but complex ways of using Mix and escript to do it while it is as simple as:OptionParser.parse(System.argv,[list that contains your rules to parse]) #The reference also contains more low level functions if neededMultiple threads and posts all suggesting some additional complexity instead of some simple function calls and links to the reference.>GoI don't think it's comparable to Erlixir in much the same way that C is not to python.Go is not high-level by any means.Its purpose seems not that different that C's is. To provide a way to write optimized concurrent programs. It's like concurrent C (not a bad thing btw) but far from a general purpose web application language.From what I've seen, I don't think Pike's programming style is fit for a whole language design. He really likes optimized code at the expense of readability and extensibility, much in the same way a lot of acme's codebase is written. And he seems to really not care about other paradigms (pic 2).Which might be good for applications needing speed above all else but not very good for a programming language.I still don't understand the difference between Go functions and methods. Is it just syntax, is it there so that object oriented programmers feel comfortable?Why not call interfaces what they normally are, a type of polymorphism?I don't really mind the blocking channels, I think that this is a good way to optimize.I also like the overall simplicity and that it's geared towards optimized computations.But that is what it should be with easier polymorphism and better syntax/readability features while not trying to be something else.Erlang's design feels a lot tighter while it shouldn't because the language is a lot bigger.jaerlang2.jpgpike.png
       
 (DIR) Post #ALMPqg8jHKQuJJSWAa by p@freespeechextremist.com
       2022-07-10T21:10:11.703401Z
       
       3 likes, 0 repeats
       
       @laurel @rubrica (Apologies in advance; it is a bit of an old thread, and I don't want to bore you by repeating myself but it may be inevitable unless I reread the thread, which would eat a big chunk of time, especially if I consider the amount of time I spend trying to figure out what I meant and deciding if I still agree with myself.  "If I had more time I would have written a shorter letter.")> Even though initially the syntax seems complex (of both Erlang and Elixir)LFE was appealing to me when I was doing Erlang at work mainly because of that, but LFE was very, ah, sensitive about OTP version.  So in Erlang, I'd put a semi-colon where Erlang expected a comma or vice versa and I'd get an error about an arity mismatch six pages away from the actual misplaced punctuation.  Other than that kind of thing, it was a really fun language.  It was like the thing I wished Haskell had been.> Mediocre to bad books/guides when compared with Armstrong's book and most of Erlang's resources.It's really hard to match Armstrong's writing.  He's a really clear, careful thinker.> I find Mix(build tool) very annoying and have avoided using it at all.Not a fan myself; I don't really like rebar, either.  Most build tools are terrible.  (I thought I might try to get mruby running on Plan 9, just poke it to gauge how much effort it'd take; turns out they use rake as the build tool.  Boooo.)> A community hooked on scripted solutions(is this the ruby on rails legacy?), making it difficult to find your way around the language features even though the features are there.I think Rails is a symptom of the same tendency.  Answering a question about why MIT's 6.001 moved from Scheme to Python, Sussman gave a really interesting answer, part of which is that a big part of programming moved from synthesis to analysis:  instead of writing code, you poke a library like a black box to see if can be cajoled into doing what you want, because it's cheaper to use an off-the-shelf solution than to build it yourself.  (I didn't like the answer, not because it's a bad assessment—he's absolutely correct—but because someone's got to synthesize the library that people are analyzing and if MIT is not the place you learn to do that, where is that place?  It's bad enough most CS departments are tradeschools, but it's worse if MIT goes that way too.  Somebody has to know how things work or we'll end up with a StackOverflow ouroboros, and this is a step in that direction.)> It's like concurrent C (not a bad thing btw) but far from a general purpose web application language.Well, Revolver is written in Go rather than Erlang or Elixir or Ruby or Python, so you have my thoughts on that.  So far, Go and Limbo strike me as nicer implementations of CSP than Erlang or Elixir (though I still think Erlang is really good).I mean, you know the canonical Scheme implementation of OO (state wrapped in a closure, messages modeled as symbols passed as the first argument), and that's more or less Smalltalk's style of OO distilled; it doesn't look like what is typically called "classical OO" (C++, Ruby) but it's actors sending and receiving messages, and CSP is a fairly straightforward logical extension.So I think if you walk down those branches of language evolution, Go and Erlang are a really conceptually clean version of those ideas.> I still don't understand the difference between Go functions and methods. Is it just syntax, is it there so that object oriented programmers feel comfortable?On its own, it's just functions with the first argument moved.  "f(g)" turns into "g.f()".  There's barely a reason if that's the entire story, but it starts to get interesting when you look at interfaces.  The way it worked with Limbo was a runtime type-check on the VM, so you load a module and it does a check, does the module satisfy the interface you expect?  The load succeeds if so, you get an error if not.  Interfaces are satisfied at compile-time in Go, but in principle it's the same thing.Like the Writer interface I was talking about a month or so ago, a lot of my code got much simpler after that clicked:  I did way less passing around blobs and doing computations on the blobs and more functions turned into filters a few lines long, in practice it works a lot like lazy evaluation or a shell pipeline, the code keeps getting shorter and more legible.> Why not call interfaces what they normally are, a type of polymorphism?Go, Limbo, even the way it works in libthread on Plan 9, it looks a lot to me like a really conceptually lean attempt to get the benefits of OO facilities without pulling in the baggage.  Your mileage may vary on how successful the attempt seems to you, but I'm pretty pleased.  I think it's gone somewhere pretty good.> I don't really mind the blocking channels, I think that this is a good way to optimize.I think managing language-level threads is a little nicer in Erlang, you get pids and you can tack on callbacks, "Tell me if this guy dies."  (You can kinda do this in Go, it's just not quite as straightforward.)> I also like the overall simplicity and that it's geared towards optimized computations.A lot is made out of the optimization; I don't really see it much when I'm writing the code.  Maybe it's due to my style, but I think "What do I have and what do I want it to be?" and the code ends up fast and that's pleasant but superfluous:  it's a language that feels nice because you can express things in a straightforward way, and you can express things in a straightforward way because it's conceptually lean, which makes the implementation lean, which makes the resulting program fast.  The important part is the simple, concise expression; very few languages feel that way even after you get good at them.  Just in terms of how writing it feels, it's not as lean as Forth or C, but it feels far less crufty than most languages.> Erlang's design feels a lot tighter while it shouldn't because the language is a lot bigger.:dmr: said that Unix and C are very simple, just it takes a genius to understand the simplicity.  I laughed when I read that, because Unix is like Lisp in that sense:  it feels big until it clicks, and then when it does, it contracts significantly.  I've written reams of Ruby and Ruby's the opposite:  it feels bigger the more you write.  I'm not qualified to decide which category Elixir falls into, but Go keeps getting smaller the more I write.
       
 (DIR) Post #ALMS6UU2aFr0hW5vo8 by laurel@freespeechextremist.com
       2022-07-10T21:35:27.768765Z
       
       1 likes, 0 repeats
       
       @p @rubrica Thank you for the detailed answer, it helped clear out a lot things.I think that after I study Go a bit more, spend some time with plan9/inferno, and potentially read Revolver's source I'll understand the language better.
       
 (DIR) Post #ALMUWsUo82cobyACUy by laurel@freespeechextremist.com
       2022-07-10T22:02:38.504289Z
       
       2 likes, 0 repeats
       
       @p @rubrica >Writer interface I was talking about a month or so ago>Passing around writer/reader interfaces>benefits of OO facilities without pulling in the baggageAhh, now I get it. Should have started with "The Go Programming language" book and ignored all the online sources.go1.pnggo2.png
       
 (DIR) Post #ALMZq9HCSkyZvbo66K by p@freespeechextremist.com
       2022-07-10T23:02:08.969213Z
       
       4 likes, 0 repeats
       
       @laurel @rubrica As far as reading Revolver, the oldest parts of the codebase are the most clunky, but here's some debugging code from the scratch directory, with bits removed for the sake of brevity:rsp, err := rhttp.Do(req)buf := &bytes.Buffer{}r := io.TeeReader(io.TeeReader(rsp.Body, os.Stdout), buf)a, err := litepub.ParseObject(r)id, err := renc.StoreTree(buf.Bytes())(As you can probably guess, because it's debugging code it just panic()s on errors.)So the JSON parser can take a stream¹, and this means I can just send the HTTP response body there.  Since it's debugging code, it's spewing to stdout, so there's this interface called "TeeReader" that reads one stream and writes to two streams, and then you can chain it like the normal tee command.  I persist the source object to the big content-addressed, block-based data store, but that expects a byte array, thus the buffer.  So after the object is parsed, it gets boxed but with a link to the original data (just in case), and the boxed value is what the code mostly deals with (because the code has different expectations of values, because it has different constraints due to being P2P), that's what gets persisted and loaded and queried and indexed and whatnot.  Anyway, instead of pushing the data around, I could say, reasonably concisely (which is ideal for debugging, speculative code, etc.) "Take this stream, send it to all of these places" and it'll go there as soon as something forces the actual read()s to go through.  Depending on how you squint at it, it's like a pipe but without pushing the data through the kernel, or it's like a lazy list (if you never end up actually reading the data, none of that work happens).  So you can do things like pass something through the signature verifier or hash it or whatever, and then check the signature after you've parsed the data and then if all that succeeded, then you can keep the hash around, or in this case spew to stdout to see where the code is screwing up.A lot of the standard library is written around this style, so even if you don't spawn a thread or use a channel, things get streamed to places on demand, which it lets you write topical code in places and then the error handling and blocking I/O can be kept local to the chunk of code that's obligated to care.  It's pretty efficient, but that's just a bonus.¹ This is one of the few good things about Go's JSON parser; see tedu's webs library used in Honk, the junk.go bit should give you an idea of how ugly Go's JSON is.  Revolver goes to some effort to make sense of the various creatures you encounter in ActivityPub but the more code I write to try to make sense of it, the more appealing tedu's approach becomes.
       
 (DIR) Post #ALMa0AKBQ9Lk4gykT2 by p@freespeechextremist.com
       2022-07-10T23:03:57.593062Z
       
       2 likes, 0 repeats
       
       @laurel @rubrica Oh, yeah, that's a really good example.
       
 (DIR) Post #ALMaGsRRA8j1XCLAbg by ins0mniak@freespeechextremist.com
       2022-07-10T23:06:58.806814Z
       
       2 likes, 0 repeats
       
       @p @laurel @rubrica :tyrellsmug:
       
 (DIR) Post #ALMaXXmPEgHyNN60Cu by p@freespeechextremist.com
       2022-07-10T23:09:59.533533Z
       
       5 likes, 0 repeats
       
       @ins0mniak @laurel @rubrica :soy1::go::soy2:
       
 (DIR) Post #ALPck7v5TbkfJtAE3E by laurel@freespeechextremist.com
       2022-07-12T10:18:48.614464Z
       
       1 likes, 0 repeats
       
       @p @rubrica To recap, after I had some time to think about this:Interfaces allow us to:1. Keep code tidy and modular2. Reader/Writer interfaces in particular to build pipelines where data are being filtered and processed *as they are being streamed*. Making this implementation very efficient since they can be dropped early and/or the processing to be modified for this particular package(blob) before the majority of the data has even left its original location. (all this in a tidy and modular manner according to 1.).Also, data can be split off to a goroutine and processed in parallel, pretty much creating a tree structure that the data are traversing concurrently.I wonder how it compares to Elixir's GenStage, probably the Go implementation is orders of magnitude faster and a lot more hackable since GenStage feels a bit opaque and API-like. (I'll update when I know more about it)0a8079be7b7ffdb0a093cdde35d7424329e5feea99054c14a31c6818bad26154.gif
       
 (DIR) Post #ALPhcSo8Qp8pYZ4rAm by p@freespeechextremist.com
       2022-07-12T11:13:27.025858Z
       
       1 likes, 0 repeats
       
       @laurel @rubrica I haven't used GenStage but I'm a big fan of the uniform interface stuff.  That's the actual cool part about Plan 9/Inferno:  every object on the system has a uniform interface that you can interact with using the same tools you use for on-disk files.  Like rio windows, you know, you can grep the text in them, you can read their chunk of the VRAM.  It's basically the same big idea that appeared in Smalltalk and Lisp machines:  there's a protocol for talking to everything on this system using the regular UI.  It's just that the UI in Plan 9's case is textual, and 9P is a wire protocol so it doesn't matter if you're speaking across the network (except the difference in latency).
       
 (DIR) Post #ALU7IMs9AkC1oLAo0u by laurel@freespeechextremist.com
       2022-07-14T14:19:59.664369Z
       
       1 likes, 0 repeats
       
       @p @rubrica Yeah, doing the concurrency/reusability/pipelining thing with reader/writer objects does make the code applicable pretty much everywhere, making it a very useful as a programming practice. I've been experimenting a bit with Go reader/writer interfaces and they are extremely fun.Btw, the more I interact with the elixir ecosystem(packages, community, etc) the more I think that what I really like about the language is using it to read Armstrong's book and learn about concurrent/distributed programming.Elixir feels like they keep building these gigantic things on top of Erlang and replacing simple primitives with layers upon layers of abstraction. And they are adding more shit every single year.Is there a Go book you'd recommend other than "The Go Programming Language"?
       
 (DIR) Post #ALUCJAypN9QwzKVEm0 by p@freespeechextremist.com
       2022-07-14T15:16:09.930804Z
       
       2 likes, 0 repeats
       
       @laurel @rubrica > experimenting a bit with Go reader/writer interfaces and they are extremely funYeah, it allows you to sort of offload a lot of the repetition, but in a way that doesn't require anything magical at the language level.> Elixir feels like they keep building these gigantic things on top of Erlang and replacing simple primitives with layers upon layers of abstraction.Yeah, I really like Erlang; Elixir's nice but I think the better accessibility had the side-effect of attracting people that were using Elixir but wished they were using something else.  If something's weird enough, it's difficult to confuse it with something more familiar.  So I think that a lot of people writing Elixir still think in Ruby or Python instead of thinking in Elixir, and this harms Elixir somewhat.> Is there a Go book you'd recommend other than "The Go Programming Language"?That's the only one I liked so far.  I downloaded a few others but haven't read them yet; I think reading code works better, but there's a lot of really bad Go code.  bloat is a pretty good codebase, though.
       
 (DIR) Post #ALUJh04cH2vzn6WA7c by ins0mniak@freespeechextremist.com
       2022-07-14T16:38:54.362939Z
       
       1 likes, 0 repeats
       
       @p @laurel @rubrica :go:
       
 (DIR) Post #ALUJsGEKXnRb5MQmAa by ins0mniak@freespeechextremist.com
       2022-07-14T16:40:56.486163Z
       
       2 likes, 0 repeats
       
       @p @laurel @rubrica the go playground is pretty cool. It's got some really helpful tutorials. Also I agree about "the go programming language". It should be the only book you need.