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.
>projects you're working on, stuff your coding, learning
Someone released a Python library for ffmpeg, so I'm trying to make a GUI frontend for it as a personal project and learning the hard way why people don't like making GUIs. Although, XAML is actually very pleasant for that purpose.
A friend/co-worker and I are trying to make a phone application for the office that'll be a simple intranet scheduler application for the conference rooms we have in the office. I still don't know how we're going to handle the calendar part, though, because I have no idea how one would handle that and google searching hasn't been very fruitful.
>but will still be useful in a professional setting, something I can make usable stuff out of.
From what I've read, you're simply not going to get away from languages like Java, C, C#, C++ when it comes to making useful programs for a professional setting. I've also read, however, that Haskell and F# are really coming into their own as functional programming is finally starting to battle against OOP for the paradigm spotlight. Disclaimer: I don't know a whole lot about programming.
I believe almost every language has a place in some comercial setting, however obscure (esolangs notwhitstanding). Surely there are FORTRAN applications that still need maintenance, even COBOL struff, and I suspect there may be more antediluvian LISP applications scattered about, and I've heard rumors of people wwriting APL for a living.
But to suggest you languages that you might find handy to code something useful in: Haskell, Common Lisp, Racket, Erlang, Clojure.
Haskell is even used by Facebook somewhere, it's probably a good language to start learning languages that are not Algol-style.
Common Lisp is old but it's the most interesting lisp available and still at the cutting edge of language technology
Racket is an interpreted dialect of lisp with batteries included: has regular expressions, networking, systems programming, all sorts of things.
Erlang is largely used in Telecomm, it's emphasis is on massively parallel programming, it combines the actor model (central to OOP) with functional programming
Clojure is a sort of lispy dialect running on the JVM, I hear it's making itself a place in the industry because, of course, java.
>>257>Let's hear about projects you're working on, stuff your coding, learning. Trade secrets, info, tips, whatever
After a slight burn out on a big project, starting to code again is somewhat difficult. Instead of starting the next big project, I found that making a really small something is easier. I've finished a trivial note-taker script in one evening and seeing the working result almost immediately and applying it is really satisfying - brings the joy of making programs (and solving problems) again. > 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.
I've been looking for something like this for a while. Tried golang, racket, wanted to try forth but could not find the implementation that was good enough. I heard Elixir is promising, but I know nothing about it.
Go is definitely gaining traction in industry, it's what I spent the summer getting paid to do. It's a pretty small language: easy to pick up, but not particularly enjoyable. If you want something totally different, Haskell and OCaml are taking off, but you're basically restricted to working for a banking or investment company at the moment.
I have a really great idea, and the right skills to make it a reality.
But I can't think of any way to profit much from it (Even though huge and small companies will profit from it when it comes to fruition)
And even then there will be the bigger hurdle of it only becoming useful when it becomes kind of a standard (There is nothing like it currently though).
What can I do to get people to notice it, after I developed it?
I thought about doing some showcase videos and posting about it online. Do you think that will be enough?
For a few years now I've been working on writing a tiling game engine in Python called Driftwood. I took a very long break but returned to it about 2 weeks ago and have gotten it some halfway closer to beta since. It's a remake of my previous game engine, Tsunagari, which was written in C++, and poorly designed and unmaintainable.
Driftwood boots up and then provides an internal API to a world package made of images, sounds, maps, descriptive files, and scripts which tell the engine to do things. Each game starts with the engine loading a script which tells it how to proceed, and then the maps and entities can have events which call other scripts. The goal is to simplify game making eventually to somewhere around the convenience of RPGMaker. Currently its limited feature set is functional and it's in early alpha. I'm working with one partner.
GitHub if anyone's interested in taking a peek, though currently it's only guaranteed to work on Linux and there is a known problem with Mac OSX that my partner is working on. Windows is untested. You also can't do all that much with it right now, as it's lacking text and UI functionality, but it's almost to the point where you could make a game similar to Yume Nikki. There's also no manual, but the code is documented well (though it's untested for many possible situations and probably riddled with bugs at this stage.) https://github.com/seisatsu/Driftwood
I'd say make it first, then worry about marketing.
Particularly because you won't be able to make it fluorish if you have nothing to show
Code can be for fun you know. Just make it a side project, your life's work can be something else.
Ahh, I've been waiting to post this.
I've been working on napalm, a terminal-based ASCII/ANSI painter written in C with ncurses. It has some similarities to how you interact with vim. Currently, in 0.1, it lets you make canvases, draw on them and save the output to files.
I'd appreciate it if sushis tested it and reported back bugs, because I'm sure there are loads.
Sei, that looks awesome. I might peruse the code/try it out.
I will program it in any case.
But I want to actually see it used, and more importantly I don't want my idea exploited,
like google, microsoft and the like making millions out of my work (without me seeing a single cent),
or even worse, them managing to patent it or something!
That is hard to do unless you make it proprietary, but you wouldn't be so bad a person would you?
Sorry if I have no substantial advice, I might advice you to either try crowfunding or get leverage from some company you can sign a contract with, that can market it for you. Problem there is, you are prone to getting backstabbed by them if you choose poorly, so if you do that get a good lawyer
It's hard because companies like google will most surely find a way to make millions off it if they can…
It's not terribly hard to program for anyone competent, really.
So making it proprietary wouldn't even protect anything.
Also software-freedom is important for me, so this isn't even a choice for me.
Well, even if it gets big, and I don't get any money out of it, a bit of fame isn't too bad either.
I'm actually quite surprised why this isn't a thing yet (Maybe multi-billion dollar corporations aren't really a hotbed of creativity after all)
Anyway, I'll definitely post it here when I put it up on github! Also sorry for being so secretive.
I've been writing a concurrent web framework based on Golang's net/http. I'm able to write basic web servers now, which is pretty neat
If he's doing the writing and you're doing the programming, who's doing the art?
he's done some photography for backgrounds and im using a cool little piece of software called iicharacteralpha to generate the waifus and other characters. its not ideal, but the budget is $0 and neither of us do art so we're kind of s.o.l.
Cool. I guess you two are doing this for fun, so whatever works, works.
I've been wanting to create a little game myself for some time now (been looking into the love2d framework), but my complete lack of skill when it comes to art/sprites is what keeps me from even starting.
Im working on a project and would like to get more input from sushies while Im making it so I can share when its done. I also put up this >>>/arcade/184
and will put in a DB update tomorrow.
Im building a turn based game in Rails 5 and HTML5/JS. I will be using Ruby all the way though to keep to only one language on the back end. I will keep up here as well for any one interested.
How do I get better at coding, or at least coming up with things to actually do? My biggest problem is an apparent lack of imagination, if I want to sit down and code something, I have do idea what to make or where to begin.
and this is my first big project. The best way to practice is to make little tools that you need all the time (or just want ala youtubedl) and just do what ever comes to mind. Helping in projects is always a great way to get good as well. reading other peoples code is not always easy and it takes practice as well.
>>289>make little tools that you need all the time
And that's part of what I mean. Most of the time, I can never really think of anything that I need done by a program.
Actually, there probably is something I could do. It's a little more involved, but definitely not outside of my skill range. The issue is that it would require me to obtain a database of a mass amount of stats (or just copy everything by hand, which would take eons and leaves way to much room for error). It wouldn't actually get me to do anything for a while, though.
I'm trying to get used to Godot, but these scenes and nodes are just plain weird.
>>290>The issue is that it would require me to obtain a database of a mass amount of stats (or just copy everything by hand
See, that's your first tool to write. Instead of copying by hand, let a program handle the task.
Well, the thing with programming is that languages are usually fit for a particular domain of application. I don't think there is such thing as a 'general purpose programming language'. C is great for working with raw data or interfacing with the kernel and most libraries, yet it's really hard to do some high-level stuff.
Perl is great for mass data processing, R is great for statistical analysis, and lisp is great for manipulation of program logic. I found ruby to be great for structured programming.
So first you got to find the best language for your particular purpose, or if you're in love with a language, the particular domain of that language.
Usually you build up your knowledge gradually: what is some basic stuff I can do with this? then do it.
Has anyone here ever used ConnectWise Automate/LabTech before? I'm looking to impress a company I had an interview with this morning, but having trouble trying to decide what direction I want to go in for a project.
>>262> based on C> with garbage collector and pointers
Sounds just fine imo. I've been fiddling around with Ethereum for some time now. The dev team seems to like Go pretty much, ending all their github/wiki pages with> golang <3
>>257>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.
I'm constantly reading about programming in some form; it's fun. I've been meaning to pay ECMA-48 proper attention, but I still read other documents more lately.
I'm mostly working on a development tool as of right now.
>Trade secrets, info, tips, whatever. Programming isn't something that should be done alone in a corner.
Even on the wired, we're still alone like this.
>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.
Lisp and APL have already been mentioned.
Consider learning a machine code; you'll use an assembler for this. Avoid Intel.
Recently I've been learning Haskell and recently wrote myself a simple file encryption program. I'm pretty proud of it and I'm finding Haskell and the whole functional programming thing really interesting. I'm considering learning something like OCaml as well as I hear that's getting real popular.
I released v0.4 of napalm, my ncurses-based program for doing ASCII and ANSI art. This version is all about adding layers instead of having a single canvas. You can now import multiple files without overwriting everything, for example.
It's written in C, and I guess I learnt a new way to initialise a struct in the process. It's interesting to note that, since the first commit (612 LOC), the number of lines of code has quadrupled. Whether that's good or bad, I don't know.
The code is here: https://gitla.in/chibi/napalm
>>257>Let's hear about projects you're working on
I'm making a pseudonym generator in C. For now it takes a string of characters in input and randomize them, the difficult part would be to make the output readable, so I have to detect vowels etc…
Do you sushis think it's possible to live off your own code projects via patreon or something?
git link? since gitla.in is down.>>626
The homepage for the project is now: http://unraed.uk/prog/napalm.html
There's no code browsing though, just a link to clone the repo (this is a bit slow for some reason, be patient!). If you have any comments whatsoever, email me. I am always grateful for people testing it out.
I hope you don't mind, but I looked through your webpage and found your music. You should make more, it is very comfy.
You don't know how happy that makes me. Thank you for saying so, sushi. Unfortunately you cannot expect new music for a while because I work on it quite slowly, so maybe check back into unraed.uk in a year or so.
(Saging because off-topic, btw)
hey sushis. recently i've been looking at taisei (open source touhou clone). the graphics are surprisingly good, the soundtrack is great and the codebase seems to be really clean and organized. I don't know too much C but I'm hoping I can figure out something to do and contribute! anyone know anything about this project?
in other related news: I finished a really quick mangadex downloader in python. figured out their new api and just downloads chapters in parallel and tries to do padding so you can just `feh -r` a directory. Can post code if anyone is curious, I'm frequently without internet so I like to download most of my media.>>785
Looks nice. I like the use of color to separate different fields.>>593
hey, that's great! what program did you make? I think learning haskell made my code in other languages better, I try to be more pure/shorter functions and so on now.>>288
I think a game is a really good project to start because it involves a lot (video, audio, math, concurrency) and you can easily think of ideas for new features/modes/power-ups etc. A fun one I like to suggest is the game from Tron (kind of like multiplayer snake–you grow by 1 in the direction you face each turn, if you hit another snake's body, you lose). You can even do it over the internet with websockets for extra difficulty.
working on some infosec tools related to shells and botnets
If you are somebody who would try Haskell, just try Scheme. Seriously, once you realize that code is data, you can just choose (i.e., extend) the best language to fit your problem.
Haskell might lure you into thinking about your problem with monads, applicatives, and functors. "It all looks so neat and tidy," you think. Really, you are just locking yourself into a box. You're in the Haskell box. In Scheme, you create the box.
A C programmer might say "I will return from the function early when I encounter an error."
A Haskell programmer might say "I will lift my function into a maybe monad that will prevent further applications when I encounter an error."
A Scheme programmer might say "I will write a macro that only applies the next function if the previous function succeeded."
Which one sounds the most natural? The Scheme programmer! Why? It's because the Scheme programmer creates a LANGUAGE. The C and Haskell programmers must live with the decisions of their language designers.
Remember! Language designers of general programming languages design for the general case. The only way to conform to your case is to become a language designer. The easiest way to do that is to use the homoiconic Scheme language.
I wanted weeks ago to build a small blog with Node.js Vue.js, Express and set up something around Docker o have a development environment without having to install anything on the host machine. I managed this last part and learned a bit more about Docker, but quickly lost interest for the main task. Web development bores me as much as I find everything related to it tedious or daunting. Laziness must also be part of the problem
Otherwise I still have an "art" project in Python using Pillow, I'll rather rewrite it in something else but this library's API is great
Seems to miss the point of haskell a bit. Sure it is less flexible, but in exchange you get abstractions that are broadly reusable because they follow simple laws and have an ecosystem of libraries build around them. Also the type checker can reason about them then, so it suggests what your function should look like and rules out certain classes of bugs.
Still waiting for my ideal language of a scheme with full dependent type checker running on top that you can interact with. Until then I'll probably stick with haskell.
Not everybody works the same though, it takes a bit of a creative disposition to dream up that best language, or even just a good one. Constraints and small boxes to work within have often been cited as inspiration, no doubt you've heard it before.
Kind of a LEGOs vs clay type of situation.
I like lisps too, but you have to realize it isn't the holy grail for everybody. An infinite journey of new boxes isn't always best procedure.>>1407>my ideal language of a scheme with full dependent type checker
If you'd be prepared to put in some work, you could have a go at a toy scheme (based on "Write yourself a Scheme in 48 hours" perhaps) in haskell, figure it would be pretty easy to integrate whatever you like from haskell into it then.
Web development is just… boring. That was my focus in school, but I frequently found out there was no passion in web development, and people basically just do it because it's a "get rich quick" scheme. I went into "real" programming i.e. systems programming and find my tasks much more enjoyable than copying the same boilerplate ad nauseam.
System programming seems way tougher to get into though, are you working in a particulier subset of it (driver, desktop application, embedded, etc)?
I have worked on both drivers and embedded before. Right now I am working on "cloud native" architecture. I contribute to some open source projects (which are desktop applications) but they are rarely updated projects.
New /adv/ type personal issues board at https://clooven.com
is what I've been working on.
I've put my side projects on hold at the moment and I'm concentrating on my coding assignments, particularly for a class about data structures. It's really fun.
Currently we're learning about stacks, interfaces, user-defined exceptions, big O notation, UML diagrams, polymorphism, inheritance, abstract classes, bounded vs. unbounded ADTs (like arrays vs. vectors), separation of concerns (using many classes with separate purposes instead of putting everything into a Main class), reusable packages in Java, when and where to use different data structures, making test arrays to test ADT classes (kind of like a really primitive version of unit testing), etc. I also had an assignment where we had to make lists that you could search or sort, and I implemented bubble sort and sequential search algorithms.
Later in the class we're going to go over linked lists, graphs, trees, and maps.
Sounds like a lot of fun. Sometime I wish I should go to college again and study CS.
I got back into the SICP book again, witch Chicken Scheme and a proper Emacs setting, still stuck as early as exercise 1.7 and 1.8 because I suck so much at maths, but I have the luxury to take the time to understand, so that's ok.
i've been working on my final year project, a mini OS / lisp vm. my plan is an emacs like system whereby the kernel is written in C and manages low level stuff like drivers and virtual memory, but incorporates a lisp vm to execute userspace lisp. Processes are similar to the Unix model but instead of code and data we have two code sections, one for the lisp sexp and one for compiled code, and an env section instead of data.
- Process Model
|Lisp Code|JIT Code|Env|Header|
This way regular lisp code can either be interpreted, or the process marked for jitting, and the kernel will parse and jit the code into the other code section.
Since this is a hobby/""""research"""" project I'm not worrying about practicality or real world applicability, I just wanted a lisp machine. But if its going well I may put more focus on immutable data structures, especially a shared env between parent and child processes, since nowadays memory is in great abundance but concurrency is still a little awkward.
right now I'm still setting up the OS, I have malloc and printing, I need to get interrupts and paging going, and I have a lisp parser. Once I have the kernel set up I can work on the lisp interpreter and userspace code.
This sounds really cool and interesting sushi, but I don't understand it!
Does this mean that a person using your OS can execute Lisp code as if it were machine code? So you wouldn't need to start a separate Lisp interpreter in order to run Lisp code?
Also, what is 'Env'?
thanks!>Does this mean that a person using your OS can execute Lisp code as if it were machine code? So you wouldn't need to start a separate Lisp interpreter in order to run Lisp code?
Yes, and yes. The tight integration between the kernel and the VM/interpreter means that essentially to the user this is a Lisp only OS. Which seems quite limiting considering all modern OS's are 'multi language', i.e. they're happy with any executable code in userspace, as long as it compiles to the machines native language. But since this is my degrees final project, and I can pick what I want within the category, I decided to just do something fun that I've always wanted to make.
Additionally, since Lisp has such a simple syntax, it's not a bad target for compiling to from other languages, if not for the fact that Lisp support is very limited in the real world.
>Also, what is 'Env'?
Env is the environment for each lisp process. In unix/x86 terms this is the 'data' section of the binary. This contains all the contents of current variables, or in functional programming terms the state of the program. Every time the interpreter encounters a symbol definition, say 'x', it will look up 'x' in the env, and get the value of it. Only a few functions modify the env:
(set! x 10) ;; add or modify the entry x in the env
(let (x 10) (...code...)) ;; create a new inner environment
(defun add (x y) (+ x y)) ;; add the function entry 'add' in the env
(apply/funcall/[just call the function] add (1 3)) ;; create a new inner environment and set variables to values specified
So in theory, an interpreter could take two arguments, a function (in the form of an sexp), and an env. It would modify the env (if the function has any side effects), and return the changed copy (or modify it in place, same outcome).
This means we can also do stuff like saving an env to disk to suspend and resume a program, or reloading code but keeping the env in place, allowing hotswapping code as it runs. Pretty cool.
Thank you for the explanation - it makes sense now. Does this make your OS safer than one which runs machine code which might have been compiled from an unsafe language like C? Or would the same problems with C recur if you had a C to Lisp compiler installed on your LispOS?
Anyway, best of luck on your project sushi!
I'm learning, again.
It's a problem really, I've started up so many times with the basics but dropped it before I got to a point where I felt proficient. First couple of times it was cause I was trying to get into C++, because I decided that was a good idea as a first for some reason. Never felt like I got into actual problem solving, just an endless ride of learning semantics, that I quit and started all over again repeatedly. Later attempts got borked cause I always got itching to language-hop sooner or later.
I guess I got to see a bunch of langs, pretty comfy, only superficially though. I really liked the feel of Fortran.
Finally found something that feels like home in lisp though, just flows right somehow. Feels like the one I should go all in with and gain real fluency in. (Actually am so teased by J right now though, but can't switch again, gotta keep focused)
Plan right now is to get somewhat fluent, and then go through the old Advent of Code years as practice to make everything stick and actually get some implementaion-practice, maybe even in time for december if I put a move on.
I'm a weak man, I accidentally went all J just the day after that post.
Really gotta switch back to CL and get that fluency going, but will also have to return to J later (or just make it every other session), really beautiful language.
Just a tip for very comfy Lisp typing, rebind Caps to some unused key (sharpkeys on windows, I used F13) and then use that as a modifier to place parentheses on home row with autohotkey. I do;
J - (
K - )
H - #
L - '
I never really minded all the parentheses, but it's butter smooth like this.
Would really appreciate it if anybody knew how to set it up like this on Linux too, been planning to move back from windows soon.
If you're using vim or emacs, you can remap keys based on buffer type (so if you have a .lisp open)
updates on unnamed Lisp OS: not much. I've been very busy with other uni work, however I wrote and rewrote and rewrote my Lisp parser and printer. They work now. I still need to do some work on the env and typechecking, but a few days ago I hit the milstone of being able to put:
(+ 1 2) and getting => 3
I have to debug interrupts and then I can write a keyboard driver, and we should be on our way to a REPL. That's a good milestone 1.
As a side note I've been obsessed with the idea of Literate programming recently. I rewrote my emacs config in org mode with babel to test it out. It makes writing code a much slower process, but I think that's a good thing. Writing a codebase like it's a work of literature, describing its own inner workings in a human language seems very nice. It's a shame it never caught on.>>1458
I've had to write matlab the last few weeks for uni coursework, and despite it feeling detached from the world of programming and having some horrible quirks, I've grown a big appreciation for Array based programming as a whole, ala APL and J. They really are beautiful languages, and despite the obvious real world difficulties of APLs unique command characters, there's an elegance to the concept.
Perhaps when you feel confident enough in CL you could try implementing a J style language in CL. It would be cool to see.>>1467
This is a cool solution! I programmed space cadet parens/shift on my keyboard. At first I was just annoyed that accidentally tapping shift would give me parens, but now it's very natural.
Are you some version of me I'm not aware of? For my story is similar.
I started with C but unlike you I did enjoy it a lot, had a lot of fun solving problems and getting to know how things work at a lower level. I still do, I like to learn how programs are arranged in memory, how they are loaded, and libraries linked, and how they interact with the underlying OS and the implementation of the data-structures in the core OS, and well, everything I can.
But then I started language hopping, I got lured by Lisp, but in my case I never felt much at home with it. The one that flows right for me is Forth, but ultimately I keep coming back to C, perhaps because it's a kind of standard for me. But I keep looking elsewhere, lured by the promises of Erlang's concurrency, Haskell's type system, Ruby's object system, Common Lisp's condition system and metaobject protocol… I guess my other favorite is Scheme and in particular how one can use it to implement a larger language with stuff like an object system, or a type system, as well as many other things.
But I can't seem to focus
I've actually avoided C throughout all my language hopping, some kind of programmers superstition. Dipped my toes into ASM a couple of times, because I'm also interested in the deeper shapes of things. Just never C. To try to put it into words, I guess it's about it being the standard gateway between the lower and upper levels, and how knowing a solution to a problem will influence any solution you'd come up with yourself.
Forth is interesting, I've been reading up a bit on it on and off the last months. Seems to be a bit of a shapeshifter, hard to pin down, but what I've seen so far seems useful. Something I will have to add to my vocabulary sooner or later.
I feel you on the focus, been having some weeks with a case of trash brain myself.
Kinda see where it comes from though, have a bunch of bad habits and mental reflexes I've been aware of for years but have yet to get rid of. Go against them every now and then, get some real work done, but never long enough to overwrite them with the good habits. Fall into the old pattern when I forget I need to keep the effort up to actually change.