[ kaitensushi ] [ lounge / arcade / kawaii / kitchen / tunes / culture / silicon ] [ otaku ] [ yakuza ] [ hell ] [ ? / chat ] [ lewd / uboa ] [ x ]

/silicon/ - technology

from the trenches
Password (For file deletion.)

• Files Supported: webm, swf, flv, mkv, mp4, torrent, 7z, zip, pdf, epub, & mobi.
• Embeds Supported: youtube, vimeo, dailymotion, metacafe, & vocaroo.
• Max. post size is 10MB / 4 files.

Remember to keep it cozy!

A server move will likely be done in the near future to provide upgraded hardware. This could cause a few hours to a couple days of downtime.

File: 1476067336339.jpg (108.63 KB, 500x375, 1440248459502.jpg)

 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.
76 posts and 23 image replies omitted. Click reply to view.


I'd say Javascript is the best beginner language around. On paper it's a train wreck. In practice though, it's a REPL in every desktop browser where linking to libraries could not be easier and every web page is an opportunity to inject new features.


This literally is why we cant have nice things.


Can you guys recommend any good books for learning Java? I'm starting my bachelor of IT in July and my Programming Fundamentals course teaches Java, I want to get a headstart on it. Thanks in advance.


I read a paper once which found that 5y/o children were just as comfortable learning man of tastele programming in APL as in BASIC. It's not in my bookmarks now but I've successfully taught the fundamentals of J to beginners in year 3 (age 7-8).

Myself, I'm learning C at the moment, having always avoided it as much as possible. I'm working towards building a text editor which is kind of like Acme but for the TTY and based on text objects. It's quite ambitious but I'm not doing super badly.

Oh another thing for beginners, I hugely recommend Scratch 1.4. The modern two versions aren't so great, but that oldest one is really nice. It lacks some nice features of the latest, but makes up for it with the fact it's implement in Squeak Smalltalk. This is super nice because it means that you can access the Smalltalk machine from inside the Scratch program (shift click on the R in the logo on the top left to turn off the fullscreen). People mock it as a children's environment, but it's very powerful and comfy.


You taught J to grade-school kids?
I am much interested. How did they handle it? Did they have trouble with the symbolic nature of it? Or with the abstraction?
I think one reason people have a hard time with math may be the abstract level of discourse. I often wonder how a class would go for kids that are just learning addition and multiplication, but with some elementary algebra/number theory instead of silly computation.
Obviously easy stuff. For example, Gauss' sum of first n primes. Do you think it viable, now that you've worked with children?


To be honest, it didn't go too badly. Most of the class was doing Scratch, and I was in an APL phase and had just read the paper I mentioned above. Anyway a couple kids said they wanted to do "real programming" so I walked through dome sinple J with them. It didn't go too bad, although one of the things the paper said was good about APL was the lacj of familiarity with the characters; didn't seem to be a massive bother for the children. They never got much more complicated than doing factorials, details of people in the class or whatever but it ended with minimal prompting.


At work I'm doing some python scripts that interact with the Cisco DNA Controller´s API, seems quite easy for a non-programmer.


I am overflowing with code. So much code!!! I'll post some of it here someday.
>dome sinple
My new favorite letter switching.


I always wanted to do something of decent size in scheme.
For example, an engine to write Text Adventures (aka IF).
I'd write all the functionality from the ground up, like a format function and an object system. I'd like to try novel ideas (for me) like continuations and metaobject protocol to innovate and add flexibility to the engine, to allow for experimentation.
I'd make it compile to Z-Machine, and in a way show that a great deal can be made with a pure R5RS system.

But I don't think I can, and I have other stuff which I need to tend to.


Docker is pretty damn cool. That's all I have to say.


File: 1606541973510.webm (532.46 KB, 480x360, indecipherable.webm)

Well really all I'm working on right now is staving off depression.
Downloaded some books n such,
Just looking for a cool linux distro so I can begin to fuck around.
Any suggestions for things I should learn?

> some boring hs python classes
> arduino robots and such
> I know how to navigate linux filesystem

that's pretty much it
first real suggestion is what I'm sinking the next couple days into


god I want the fish app


Docker is pretty damn shit. I have to use it at work…


docker-compose does the networking so you don't have to!


You probably want to learn the language itself, as well as data structures. I would recommend "Absolute Java 6th Ed." Its a good intro for beginners to programming and Java.


For the depression? Exercise routine and spending time with family.

For your apparent boredom? It depends on what you are interested in.

For the Linux? Any Ubuntu based distro.


Not exactly programming, but I know basic CSS, and I'm looking to learn how to make it pretty. I want to learn some of the more, well I don't want to say advanced, but I guess more complex stuff that it has to offer. Like what are its limits?

Any resources for this would be appreciated. A book would be nice but I'll take whatever. Free of course :^)


I´ve kinda decided to make a first real project instead of just language hopping the basics over and over. Settled on making a text editor, cause it has a poetic sense to it to make something I can then write the next project inside of. Also nice with something that can be improved and twiddled with almost indefinitely with continued usage.
Right now at the stage of collecting and condensing a bunch of different resources on the hows and whys.


I'm reading through Effective Java, it's a pretty good source for people who already know Java but want to know best practices. I'm learning a lot, would recommend.



File: 1616038128654.jpeg (26.6 KB, 640x360, silver_1-640x360.jpeg)

In my own time I am learning assembly, particular for AVR boards. It's fun, and I get to cosplay as a spaceship engineer. I'm still a beginner at it, but the last thing I did was make a program that measures the voltage of a solar panel and displays it on an LED meter. (Brighter the light, the more LEDs light up, basically.) Works for batteries too of course (up to 5 volts).

At work I have two projects, one is really fun and the other is mundane as shit. I do telemetry decoding and simulation for rockets and spacecraft; project 1 is a python program that extracts sensor data from network packets and tracks their values over time, project 2 is… turning a big .XML file into a big SQL database instead. Makes me want to quit.

Everything we do is Python, but we don't meet performance requirements if we run on a particular server instead of the beefier ones. Feels so stupid to optimize Python code that needs to pump lots of data ridiculously fast. Also makes me want to quit.

Anyway, I want my code to be *on* spacecraft in the future, hence learning more low-level stuff.


I'm sorry if this is really dumb question, i'm a big doofus with this stuff, but can't you convert or compile it or something using cython or f2py or numba or something?
Please don't bully me….


File: 1616274107306.jpeg (189.18 KB, 1280x720, 4779305134461.jpeg)

I'm taking a astronomical computing class that's done (annoyingly) entirely in Python. I just don't see why academics find writing code in Jupyter notebooks so appealing.

In terms of personal projects, I'm making a reminder system for the Japanese 5S methodology in C. My ability to plan and organize is garbage, so I figured its about time to offload as many of my executive functions as I can to The Machines. Eventually, I'd like to migrate it to a Pi terminal and write some more office-assistant scripts, so looks like there'll be some hardware fun down the line as well. Its kinda surreal though, writing code that I'm using as a way for the computer to program my real-life behavior.


Astronomical computing, as in, radio data analysis, or what? Because I remember when I took that class we wrote the code in C, and the professor just crunched assembly. When you have terabytes, minimum, of raw binary to crunch, the fact that python is slow becomes crippling.


Yup crunching radio data. We've been working with such small datasets (~few MB) that speed hasn't posed too much of a problem. With the amount people in the class have been struggling with pre-built data science packages in Python, I can't imagine how they'd cope with writing things in C instead.

Any general sagely wisdom for radio lab, O' master?


Eh. I mean you're not using the same language as us and if the professor doesn't seem to care too much about how fast your code is you're also not being graded on the same criteria. If you have specific questions on the theory I guess I could give some pointers but I doubt any specific code or whatever would be useful in this case.


Some 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.


Most 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.)


My 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.


Ah 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.


RMarkdown, 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…


More 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


What's a good resource for learning Python?


I remember using Tutorialspoint back when I wanted to learn Lua, they should probably have Python related stuff.


The Python documentation has a tutorial which guides you through the basics of the language with lots of examples to copy learn from:

That's how I taught myself a few years ago. Now I write Python at work and no-one suspects me of being an amateur :)


Learning Python by Mark Lutz or learn Ruby instead (read the pickaxe book)


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.


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.


File: 1635769829962.jpg (110.51 KB, 1071x1280, pmfdf9e9ijv71.jpg)

Books 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.


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!



Thank you!


I've never worshipped at the church of Haskell… is there any difference between a monad and a child class or a mixin?


File: 1639621039421.jpg (222.33 KB, 1079x1076, Grams.jpg)

I've started daydreaming of a code editor I want to write. The problem is I know it will take so much time, if I do it in my free time it will take forever. So I'm trying to figure out if I should try to make a startup around it, or just quit my job and live off savings to work on it, or go back to university and work on it as capstone project type of thing.
Any sushigals got any vibes for me?


I 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?


Uhh 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.


File: 1642499960723.png (183.83 KB, 666x1073, mmc-chip8-gnome-terminal-a….png)

Revisiting 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:

I've written several articles about programming, and here's a good one to absorb:

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. I see this website now requires Google JavaScript just to post; how disgusting.


Maybe 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.


>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-31
The CSS needs improvement, so the Gopher version is strictly better for now: gopher://verisimilitudes.net/12022-01-31

Here's a Gopher proxy:

No; I don't include definitions I expect my readers to know; I found it clear by the first sentence.


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…

[Return][Go to top] [Catalog] [Post a Reply]
Delete Post [ ]
[ kaitensushi ] [ lounge / arcade / kawaii / kitchen / tunes / culture / silicon ] [ otaku ] [ yakuza ] [ hell ] [ ? / chat ] [ lewd / uboa ] [ x ]