This is the weekly thread to discuss what you have done recently and are working on this week.
Please be descriptive and don’t hesitate to champion your accomplishments or ask for help, advice or other guidance.
Working on the typechecker for Nickel, a type-safe, memory-safe, effect-safe intermediate language I’m building for use as a backend for functional compilers. Think Rust with a more expressive type system, or Haskell with precise control over memory management and mutation.
It turns out that if you don’t care about ergonomics or readability at all, you can create some very powerful low-level abstractions – perfect for an intermediate language! :)
This seems like it would be a perfect intermediate language for my nascent programming language, Forest.
I’m going to watch your progress eagerly. Have you had any interest from other programming language implementers?
I’m glad you’re interested! Nickel is very, very new, and you’re actually the first language developer to mention that you’d be interested in using Nickel for your compiler. When my project is a bit farther along, I’d love to talk with you more about how Forest’s abstractions might map on to Nickel’s execution model and type system. Feedback from an actual language implementer (other than myself) would be extremely helpful for refining Nickel’s design!
Would love to go through that with you, and since Nickel is actually aiming to implement a lot of what I was going to do in the Forest compiler, I could be interested in contributing :)
What do you think is the best forum to talk this through? I could open an issue on Nickel and talk about the stuff from the README that seems like it would fit Forest, if you like.
I’ve set up a Gitter for Nickel – come and chat!
Trying to iron bugs out of my work-in-progress Component-Entity-System library in time for the Lisp Game Jam that starts Thursday. It’s written in fennel, a new lisp that compiles to Lua. (s/o to #fennel and #lispgames on freenode!) Writing/drawing a bunch of game design notes as well.
I have been toying around with the idea of writing a daemon that is similar to fail2ban. I use fail2ban on my small VPS now and have found it to be memory hungry. I plan on using Rust and exploring the problems that come with monitoring log files. There isn’t any code yet but I will get to prototyping soon.
I got around monitoring log files by writing my own syslog daemon in C/Lua. I have code that monitors sshd and adds/removes entries to iptables over time. Memory usage has been negligible over time (or it’s never been an issue as far as I can see). There are other modules I’ve written (like one that summarizes several Postfix log entries for forwarding onto another system).
Thanks for sharing, I will definitely refer to this when writing mine. I don’t have much Lua experience but it is cool how tightly it integrates with C when you need it.
I’m working on a network framework for Lua. I use select()/poll()/epoll() (depending upon OS) to drive the events and use coroutines to handle the logic of a “request”. So far I have support for both TCP and UDP packets and have a very simple HTTP server (that makes a request to a gopher server to test out the outbound connections logic) and DNS requests (so far hard coded to a server—working on parsing /etc/hosts and /etc/resolve to lift that restriction).
Are you familiar with the cqueues Lua library? If so, what pros/cons does your framework have in comparison?
“What I cannot create, I do not understand.”
I”ve written enough code over the years to write my own version of cqueues.
In terms of pros/cons of mine vs. cqueues … eh. I have an idiosyncratic programming style that isn’t as popular with the C/Lua crowd (and let’s just leave it at that).
This weekend I got my chip-8 emulator to support 64x64 hires mode, which gave me a bit of a push to move to superchip support, but I’m already pushing the atmega1284’s limits, so I need to look at adding external RAM long term. 64k will let me potentially add support for things like Infocom Z-Machine interpreters and possibly things like CP/M and Commodore Basic down the line.
This week I’m continuing to consolidate a bunch of systems at the day job onto a single point-of-failure^w^w^wplatform. I’m going to chase a bunch of 44CON sponsors and possibly speakers, and assuming I get time write up some HIDIOT material. What I really want to do is move some of the static stuff to an OpenBSD VM running httpd, but as this would be under qemu/kvm I’m not sure how stable it’ll be.
Hoping to get some time on 44CON’s GDPR compliance this week. Rapture, I tell you.
For work, mostly rewriting large parts of the app that dealt with the Instagram APIs that were retired without any warning earlier this month. In addition to just completely removing large parts of the API, their rate limits were reduced from 5000 per hour to 200 per hour. Lots to do.
Did some work on my graphics engine. Added proper FPS camera (still not entirely sure why my code works - I can’t find a clear explanation as to why my view matrix isn’t storing the world coordinates of the camera in the fourth column - I think I’m doing something wrong, but it still works), and basic texturing support (ugly screenshot) this weekend. Going to add a proper lighting model, work on shadows, and refactor the code a bit next weekend. That’ll all probably push me towards adding global illumination and volumetrics for the pretty lighting effects.
Don’t want to get too bogged down in those details though, otherwise I’ll never actually write a game :P
For school, I worked on writing a 2D robot simulator that models a differential drive robot that I’ll be using for the final project in my Robotics class (https://github.com/charles-l/robsim). Good practice for using my linalg skills.
Signify on PicoLisp
Continued work on a sample presentation program for guitktk.
Finish the presentation program and release.
Was considering doing Pyweek but I don’t think its quite ready for use as a “game engine” yet.
Over at Wallaroo Labs, we have a standard “scale indepence with wallaroo” talk that I give. It’s very Python specific and I’m giving the general talk at a Go meetup on Wednesday. It’s the first time for giving a Go flavour version of the talk so I need to prep/put that talk together.
I’m also finishing off part 1 of what looks to be a 3 or 4 part series on Go performance when interfacing with other languages (like using Go code as a library from within C/Pony like we do in Wallaroo). I’m doing final edits on that first post which I’ll be publishing and posting to lobste.rs (and other sites) on Thursday.
Lastly, I’m setting up some initial conversations about the role at Wallaroo Labs that I posted here over the weekend. We got 4 excellent folks who applied from lobste.rs. I’ve emailed a couple to try and set something up later this week and will be emailing the others later this week when my schedule for later in the week is a little more clear.
A member of my team is teaching an “FP in Scala” class for the company, so I’m TA-ing for him. I am coming around on Scala, particularly now that I don’t have to write it. I’m also going to be working more on process administrivia – which JIRA board goes where, &c. That sort of thankless thing.
At home, Smalls has turned a developmental corner and is now fully into the “running jumping and hugging” phase so it is literally all I can do to stay here at work and not run home and wrestle with her. Band practice this week, my wife’s birthday tomorrow, friends coming from Montreal this weekend – it’s going to be eventful, and fun.
https://noisy.fun/ is getting updates!
I’ve been tinkering with lots of things behind the scenes, updating dependencies, improving the build process, etc. A lot of the work going into it is me just trying out things, even if they don’t add function. For example, just this weekend I switched it to FontAwesome 5.
Now I am taking some steps to allow actually adding new features (no spoilers). I need space for more controls, so I’m working on adding a menu and moving some controls there. Should also be a big step towards a better UI on mobile.
Working on a graphics live-coding Smalltalk/Self-inspired system that’s been tested so far on macOS, Windows, iOS (iPhone + iPad) but should work on Linux and Android too: https://youtu.be/rRMeOGc1JLQ Working on tablets is a main goal to allow for live drawing and fun educational applications.
Has all of love2d.org and uses ImGui for UI. Uses a multiple-prototype-inheritance-oriented object system I made in Lua where the global scope of code you write is itself the object’s members with inheritance. “methods” have ‘call next method’ in the topological sort of the ancestor DAG. The main primitive involves “send”ing a scope code to eval. The hope is for it to make sense to do network sends.
It’s in basic stages; hoping to work on error handling this week (idea: the send primitive itself notifies an error method on the object and inspectors can show logs) and try making a demo generative art painting app.
Continuing from last week
Hopefully these updates will mean a “fully” working cluster scenario (failover + load balancer + cert management + pxc) is possible using just these tools, before the end of the week.
I’m working on automated testing of a smart contract system that will handle many millions of dollars worth of tokens on the Ethereum main net. This is in addition to other formal methods our team is using.
The approach I’ve chosen is to write an exact model of the system in Haskell, which also serves as a kind of specification, along with whole-state invariants, and then running that model simultaneously with the real bytecode with randomly generated action sequences as input, verifying that the implementation matches the model and that all extra invariants hold on the model state.
In addition, I’m also doing a simple kind of mutation testing using the same test suite, where I make random alterations to the bytecode—e.g., switching an LT to a GT or frobbing a constant value—and verify that the test suite then fails.
That should work pretty well. It’s similar to what I’ve seen a lot of groups do with stuff like matching functional specs to imperative or imperative code to assembly. For anyone interested in these things, my favorite one was still this project that used ASM’s with great productivity and model size. ASM’s advantage over Haskell is that surveys showed they’re one of easiest formalisms to understand since they’re basically abstracted FSM’s. The simple programs, VM’s, and actual assembly are also usually FSM’s. So, they fit together really well.
Have you considered looking at implementing some of it on Cardano, given the Haskell support for that platform?
Smart contracts aren’t possible on Cardano yet—it’s in the research phase, as far as I know. They have a very interesting team and I’m sure the platform will become amazing, but for now, Ethereum is the only viable platform for us. (It’s “worse is better” all over again.) The first version of our smart contract system is already live today, and we’re aiming to deploy the next version this summer.
We’ve developed an Ethereum VM in Haskell (hevm) which is already being used as a library to support property-based testing (in the Echidna system by Trail of Bits, and our own system).
And despite being huge fans of pure functional programming, we think it’s possible to write correct—even provably correct contracts—for the Ethereum virtual machine. (There’s a lot of misunderstandings out there, like “you can only prove the correctness of functional programs” and “Turing-complete programs cannot be proven correct,” and so on.)
Working on open source cache server nuster, migrating to HAProxy v1.8
Implementing things for my thesis. Still not sure what the outcome will be. But I am happy to have interesting things to do.
Currently working on a federated link aggregator (ie Reddit/Tumblr mix).
I’ve got most of the DB layout down and atm I’m simply connecting up the View templates with the Model layer. Once that is done I’m gonna extract an interface so I can federate to reddit/others and activitypub. Also trying to work out how to do Karma/Scores with Federation. My current solution is to assign weights to votes and have unknown instances with unknown users have the lowest weight and as they get more local karma on an instance, they become more trusted. Similar to a web-of-trust, instances should become at least minorly trusted if a well trusted instance trusts them too. Also prevents brigading communities; outsiders need to participate to get a voice in the community and become trusted enough to hand out votes themselves. That should raise the bar significantly.
Also tinkering with hardware again, I ordered more LED strips (someone stop me!) so I’ll have to put some nails into the wall. There is only one cable in that specific area so I’m debating whether or not my GFI is good enough (wouldn’t be my first rodeo with live and neutral)
I’m still hacking on ISETL. I have removed some cases of undefined behavior, replaced macros with inline functions, and converted many of the comments to markup.
I just set up a sit/stand desk converter so that I’ll be able to switch between the two at my desk, and will be around for the releasing of the sprinting that’s been going on for the past two weeks at work.
One of those weeks I don’t have specific aims in mind, but it’ll include the following: