No.257[View All]
Let's talk coding and software, sushis, because I don't do enough of it and I really should. Let's hear about projects you're working on, stuff your coding, learning. Trade secrets, info, tips, whatever. Programming isn't something that should be done alone in a corner.
I guess if we need a thread starter, I want to brush up on my coding skills. I want to find something to play around with, something not as mainstream as the stuff like Java and C, but will still be useful in a professional setting, something I can make usable stuff out of.
102 posts and 26 image replies omitted. Click reply to view. No.1811
>>1790Some small subset of our code uses numba, yes, but most of the drain on our software is just from the nature of how it is structured. There aren't really expensive calculations occurring, it's moreso that data is being copied around inefficiently, we don't store data structures in the same way that we send them out, and stupid things like that.
No.1812
>>1791>>1793Most science is done in Python or R. The amount of packages with convenient tools available for these environments is immense. Any number crunching you do will almost certainly rely on C-written backends (e.g. numpy, and all of the other libraries that use numpy).
Python is also super popular in science since it's so quick to learn and to write. Plus, why roll your own statistics library in C when you don't have to? Science has to be done!
I was on the C high horse for years and years, but you cannot go wrong with Python for science. (But Python for high network throughput simulations… see my other post.)
No.1814
>>1812My problem isn't so much with Python or its packages. Its the language I'm most familiar with, so I use it to prototype programs pretty often.
I just don't like Jupyter Notebooks because they're used simultaneously as an editor, interpreter, markdown formatter, and (in my course) a presentation tool. I'm getting used to them now, but its a lot of features to figure out how/when to use properly. I'm used to writing in vim/nano and running stuff from commandline so I don't really take advantage of anything except the basic features every time I've tried IDE's.
No.1815
>>1814Ah I see what you mean. I haven't used Jupyter notebooks but I have seen a bit of it. I have always used vim too so that would be uncomfortable for me as well.
No.1821
>>1814RMarkdown, Jupyter Notebooks, et al are very comfy when your first concern is the science and math behind an idea and you don't really care about writing software for the particular task. "Editor" is not in the vocabulary of most computational researchers, because the computing is the means to the scientific ends they're after.
That's my assumption of why they prefer it at least…
No.1826
>>1821More on that:
ruby, python, haskell, and many other languages provide interactive shells that make it very easy to toy around with and try different language features and parts to see how they work, and to prototype ideas. APL also has interactive environments that predate yet resemble a lot of what the Jupyter experience looks like: tryapl.org
No.1831
What's a good resource for learning Python?
No.1832
>>1831I remember using Tutorialspoint back when I wanted to learn Lua, they should probably have Python related stuff.
No.1833
>>1831The Python documentation has a tutorial which guides you through the basics of the language with lots of examples to
copy learn from:
https://docs.python.org/3/tutorial/index.htmlThat's how I taught myself a few years ago. Now I write Python at work and no-one suspects me of being an amateur :)
No.1909
>>1831Learning Python by Mark Lutz or learn Ruby instead (read the pickaxe book)
No.1913
Currently going through the SNOBOL Green Book, since most of the stuff I want to do with programming is text focused stuff and just for my own fun, why not try out a lang focused entirely on strings.
Find it quite comfy actually. A bit arcane in some ways, all control flow is essentially just gotos and labels, but I dont mind.
No.1920
I am just going to say this because I need to say it.
I need to get away from programming communities. I suspect they have no positive effect on me and are ultimately distracting. Even more, I think I go into herd mode and deviate from my true or optimal path in order to accomodate to some programming culture (usually centered around a specific language, but not necessarily always the case). I'd always turn to such communities for inspiration but the net effect is that I've been barely able to produce anything at all, and I've constantly felt behind and that I should be pouring my energy in some other thing.
This does not necessarily mean that I should give up programming, but I first need to detach myself from community if I am ever to find out if programming is for me.
While on topic, I am fucking sick of programming books. Seriously. Most of them devote pages upon pages to language idiosyncracies, are unbearable verbose, and ultimately teach very little. What's more, I think they impede my ability to actually learn by myself and make me reliant on some outside source to get the knowledge I need to develop some idea, and to waste my time doing that because they're pages upon pages of prose.
Not all of them by any means, but most of them, even many that I genuinely consider good, ultimately have this effect on me.
I've been reading more math books these days and just now I've realized how overwhelmingly verbose programming books are. Just a few pages in a math book get me having to go back and think carefully about what is being said, while in programming books I find myself rushing through to get to something interesting.
This all may just be something about my personality, and perhaps math works best for me whereas programming works best for others. But I do suspect that some of what I said about programming books applies, particularly, that they seem to be filled with a lot of chaff in the form of endless prose in order to meet a 500-page quota.
Here ends my little vent on some of the frustrations that programming has caused me. Part of me wants to keep doing some of it at least, but I really feel I've lost my way. Despite what I said, I have a lost of books I really like, and some topics I'd like to learn more about. But I'm stuck, and I've been so for many years now.
No.1921
>>1920Books are good for some cs or math heavy topics, but even for those I often just get a textbook from libgen and mostly use it as a guide for what to Google. The table of contents is usually the most useful part. All the specific language books/clean code/best practices/design patterns books are trash. Most popular non-textbook books are usually as bad as yt videos.
I have no idea what a "programming community" is supposed be.
No.1922
Hello sushis,
can one recommend me a book about principles of functional programming? I'm learning Haskell and I'm struggling understanding Monads etc. It makes me feel stupid!
No.1937
>>1922I've never worshipped at the church of Haskell… is there any difference between a monad and a child class or a mixin?
No.1945
>>1944I suggest making it your pet project, startups are everywhere and for a text editor I doubt there is much demand, as they are in high supply.
I don't meant to discourage you, just don't make a bad decision.
Just take it by small steps, how long could it really take you?
No.1946
>>1945Uhh well it's not a text editor it's a code editor, primarily operating on AST and in memory objects. I think it might take me 5 years working solo using the majority of my free time.
I agree tho that work on it in free time is the most obvious good decision… I guess I'll do that for a bit, I can always switch to another strategy later I suppose.
No.1986
>>498Revisiting this thread reminds me of this haiku I wrote:
An old post startles.
I'd written it so long back;
there's still no response.
I've finished a few versions of that development tool:
http://verisimilitudes.net/2020-07-07http://verisimilitudes.net/2020-12-26I've written several articles about programming, and here's a good one to absorb:
http://verisimilitudes.net/2021-05-05I'm working on another, concerning a superior style of programming, and I'll try to remember to submit it here when I finish it. I see this website now requires Google JavaScript just to post; how disgusting.
No.1987
>>1986Maybe nod to the fact that you are using domain out of the math world meaning "set of possible inputs" it wasn't clear to me until paragraph 5 that that's the definition you were using. It's a good thought though. Program correctness is a cool study.
No.2003
>>1986>I'm working on another, concerning a superior style of programming, and I'll try to remember to submit it here when I finish it.Here that's:
http://verisimilitudes.net/2022-01-31The CSS needs improvement, so the Gopher version is strictly better for now: gopher://verisimilitudes.net/12022-01-31
Here's a Gopher proxy:
https://gopher.floodgap.com/gopher/gw.lite?=verisimilitudes.net+70+31323032322d30312d3331https://gopher.floodgap.com/gopher/gw.lite?=verisimilitudes.net+70+30323032322d30312d33312e72656164>>1987No; I don't include definitions I expect my readers to know; I found it clear by the first sentence.
No.2032
What are you guys studying right now?
I decided to finally tackle C and its been going very, very well. I'm still quite a ways from actually finishing the book I'm reading, but I will get there eventually! Linux is very fascinating and I'd like to design programs that are the best in efficiency and whatnot. Tight integration with the kernel is what comes to mind, and I've got a few ideas…
No.2037
coding is fun
coding is good
but coding can also be fairly big tussle, and it can get on my nerves
even then, i like coding a lot
No.2038
>>2032I am working with ASP.NET on college and it's a bit tough at the beginning, but I am slowly learning how the framework werks.
That still doesn't mean that my code isn't a big botch of spaghetti
No.2039
>>2038My code only started to improve, i.e. get non spaghetti, when I had internships / started my job. It's amazing how quickly you will learn when you're supervised by seniors and forced to do it 8h a day
No.2042
>>2040>>2040I think I worded it in a wrong way, what I wanted to say is that if you're doing a regular work day - which in my country is 8h - you will learn a lot in a very short time period. Especially if you have great supervisors / mentors.
No.2046
I love programming! This is a nice thread. Thank you OP bunny!
I'm going back to comp sci undergrad soon and I'm excited. I'm thinking of picking up some webgl b4 because some of the things I'd like to write will need gpu and I wanna be able to send ppl a url to let them run them.
I've been programming off and on for like 15 years, I'm pretty leet now, but I'm also still pretty terrible, ah ha ha, especially for some of my aspirations.
>>1521Ahahahha I love this sentiment. I dont wanna lie I really like computers and wanna learn about them cause they are just such a cool object. I feel like learning about how they work also teaches you how to think better… but that might be true of anything you can learn about.
>>1522Nice Marshall McLuhan quote : )
>>1920I like some prose in a textbook, add in some jokes and redundancy. It's nice for us dull ppl to have a bit of extra handholding.
>>1946>>1944So yuh I decided to go finish my undergrad and I can use that time to work on this. Yay! Wish me luck.
>>2037(^,^)
No.2047
>>2046>I've been programming off and on for like 15 years, I'm pretty leet now, but I'm also still pretty terribleI've been programming (have I really?) on and off for about 8 years now, and I'm just terrible. I suck at it really.
It's not even lack of skill, because I understand many things, almost instinctively. I have an idea of how things are out together at the lower levels (ie. at the OS/kernel), and I can also put together somewhat decent (non-spaghetti) programs.
But I'm bothered that nothing seems to "fit" well with me, and I ultimately lack any motivation needed to put in the practice that'll make me progress. And even though I've used several languages (perl, lisp, ruby, C, forth), to the day I can't confidently write anything in any of these (maybe with C) without looking up basic syntax. Nor do I really have any scripting ability,and I think that should bethe first thing I need to change.
Anyway, it was not my intention to whine. I do like this feeling of feeling some progress, even when doing things "on-and-off" over the years. My competence with certain foreign languages, as well as with mathematics is like that: I do not have the skill of someone with a formal (ie. continuous) i struction, but I do have a firm understanding and developed intuition and some basic competence. Feels good. But also feels bad because I am not very good at it either.
No.2049
>>2048There should be a whole math book written in this way
No.2050
>>2049You could probably write a program that would go through a pdf textbook and replace Greek letters with food emoji.
No.2052
I feel like getting into the homebrew scene of the 3ds, but I don't know where to start.
I wanna make an imageboard browser compatible with lynxchan.
I imagine that must be fairly difficult
No.2053
>>2049>>2050The pic is gibberish though
No.2054
>>2053You know enough math to know this doesn't make any sense? I'm impressed. I'd like to get there someday. I think it's hard to know if something is nonsense or just from another subfield or someone describing something in a way that is obtuse. But I'm barely above calculus tbh.
But the choice of Greek letters in math is a convention because they are easy to write and not otherwise used… essentially arbitrary and emoji would work just as well when working on computers… aside from math being "serious" and emoji being "silly".
No.2055
>>2054Not them but that looks like category theory, which is accessible to anyone with some background in algebra.
No.2057
>>2054It only lasts until the third line in the definition of burger where / doesn't make sense on sandwich (the set of integers).
The rest is just random words and notation from abstract algebra and category theory.
As
>>2055 said, higher maths isn't supposed to be esoteric, it's just rarely taught. I actually find the notation to be very beautiful, it has a terse precision that regular language can't match.
Try reading a bit on group theory if you're interested, it's a really fun topic and you don't need any prereqs because it kind of rebuilds how you understand algebra. You'll probably get a kick of out the generalisation of symbols and notation too since it concerns how arbitrary objects can be manipulated algebraically if there's a way to combine them that satisfies certain properties.
No.2058
Inspired by the recent discussion I started reading "Categories for the working mathematician", it really feels like wizardry! But even though I am able to follow the text for the most part, I realize there's a lot I don't know which is mentioned as examples, eg. the tensor product for groups. So I might want to go and fill those gaps, say, reading Dummit and Foote (though then would I finish?), and then, who knows, I might want to read some algebraic geometry (Hatcher?), and also fill up the gaps in linear algebra beyond the basics of vector spaces, matrices and vector calculus to which I've been exposed.
I was thinking of reading the HoTT book as well, which I think kind of overlaps with this stuff. Higher mathematics is really nice! But it's so damn huge, I feel I'll never get to the point where I can read a book and understand all of it's content.
No.2059
>>2058>HoTTI've just started descending the abyssal rabbit hole that is constructive mathematics and type theory. Maths is truly terrifying; the areas of study and seemingly infinite and each one is too deep to ever gain mastery over.
No.2086
>>2059>constructive mathematics and type theoryOhhh that sounds tasty. Does it related to Ocaml?
Unrelated, I've been thinking of picking up some webgl for some interfaces I want to make later, and maybe for games. Anyone played with it?
No.2094
>>2086>Does it related to OcamlYeah, the ML family is ths major representative of the typed lambda calculus and of type theory. Constructive mathematics is mostly done with another branch mostly in that family, of proof assistants like Coq or Agda.
>webglI'm starting to learn about it. It seems more convenient than regular opengl, as I always struggle with details when handling arrays and memory in C++. But besides that, it's not a whole lot different, just a bit more convenient. I don't know if it is significantly slower, but the point is that it uses the GPU as well so once the primitives and shaders are sent to memory it shouldn't be that slow.
No.2314
Found a cool resource for people wishing to brush up their programming skills - especially when preparing to change jobs.
https://www.techinterviewhandbook.orgIf you know similar websites, especially with algorithms focus, I would appreciate it.
No.2316
I've been programming full-time for 5 years as a full stack web developer, usually working with the Spring/Angular/Mongo stack.
If I can offer any useful advice, feel free to ask!
No.2362
>>2314Aaaah! Its been two months and I didn't even touch it!
No.2363
>>2059I still don't get this groupoid interpretation of identity types. What are those so-called non trivial elements besides identity ?
It's also not clear to me what univalence brings on the table. Is it just another formalism to do synthetic homotopy theory without having to define infinite groupoids from sets ?
No.2367
I am thinking of getting back to programming. I have a couple ideas. On one hand I'd like to write interactive fiction, probably using inform. On the other hand, I'd like to try and use webgl to make interesting computer graphics using GEOMETRY and LINEAR ALGEBRA!
I'll probably do the latter.
No.2368
>>2053>>2048>>2055>>2054I'm 2 years late, but the pic is not gibberish at all. It's asking for the cohomology ring of n-dimensional Real Projective Space (Here it's notated by P^n(R) but as a topological space it's notated by RP^n) with coefficients in Z/2Z which is the field of 2 elements. (Computer scientists here might also recognize Z/2Z as the intergers modulo 2 or the group acquired by the XOR operation on the set {T,F}. The field can be easily obtained from the group.)
I don't even know where to start in explaining everything I just said but just know that it's real math, specifically a part of algebraic topology).
Feel free to throw yourself into a math rabbit hole if you're curious about the arcane language I'm speaking in.
The answer to this pic's question by the way would be that "H*( RP^n ; Z/2Z) is isomorphic to to the quotient ring Z/2Z[x] modulo the ideal generated by x^{n+1}" or more compactly "H*( RP^n ; Z/2Z) ≅ Z/2Z[x]/(x^{n+1})".
Algebraic topology surprisingly has an application in data analysis although it is extremely niche.