jsource
handsonscala
Our great sponsors
jsource | handsonscala | |
---|---|---|
18 | 18 | |
631 | 642 | |
2.7% | 0.9% | |
9.7 | 0.0 | |
1 day ago | 4 months ago | |
C | TSQL | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jsource
-
Crafting Self-Evident Code with D
The one other example I know that morphs the language to that extent and to the detriment of readability by C programmers is the J interpreter[1,2]. But, once again, nobody (that I’ve read) claims it’s good or clear C. (Good C for those who speak J, maybe; I wouldn’t know.)
For a way to morph C syntax that does make things better, see libmill[3].
[1] https://code.jsoftware.com/wiki/Essays/Incunabulum
- Show HN: Gemini client in 100 lines of C
-
Want cleaner code? Use the rule of six
No, it was rhetorical, because it's obviously (to an APL-family programmer), not bad!
Your cultural prejudice is showing. There are good reasons APL is written the way it is, and this example is simply bringing those benefits to C by writing it in the dense APL style. There are other APL derivatives, like J[1] that are written the same way. These projects are well-maintained. They aren't collapsing under a load of technical debt. The style works. To them, it's clean code.
-
Jd
You can view the code, but is not open source: https://github.com/jsoftware/jsource/blob/master/license.txt
-
Someone earlier linked to Arthur Whitney's style of coding in the comments. Can we discuss this further? I am disturbed by what I saw.
This is the same dense style used in J.
-
Why does old C code often declare functions or global variables in the scope it's used, rather than at the top of a source file or a header file?
All-in-all this example doesn't seem too bad. It's clear what happens and is easy to follow. If you wan't to see something remarkably terribly, check out Whitney style. It's used in APL/J/K family interpreters. Keep in mind, financial institutions run that code.
- Ask HN: Examples of Unusual Code Formatting Styles?
-
if you code in J for 6 months, you will no longer think in loops, and if you stay with it for 2 years, you will see that looping code was an artifact of early programming languages, ready to be displayed in museums along with vacuum tubes
good first issue
handsonscala
-
Contrary to popular belief, Scala is actually a quite small and simple language
I recommend people go through Hands-on Scala, by Li Haoyi, a fantastic developer in the Scala community.
-
Starting with scala
You can have a look at https://www.handsonscala.com/ and see if that's for you!
-
Getting into Scala from Python
his book, https://www.handsonscala.com/
-
Suggest me resources to learn Scala.
Hands-on Scala Programming
-
Algorithms and Data Structures in Scala;
is there a great resource, book or library on classic Algorithms and Data Structures in Scala, e.g. similar in scope and quality to Sedgewick Algorithms in Java https://algs4.cs.princeton.edu/home/ I found a very helpful section on algorithms implementation in /u/lihaoyi superb Hand-On Scala Programming book , but unfortunately it's only a few pages (p.107-121). And most other books provide algorithms just an illustration for some neat language feature. The thing is, to get a job as Scala developer these days (in competitive firms) one needs to be a competitive programmer, master of Leetcode, and Scala doesn't seem to have strong ecosystem in that regard as Java, Python or C++. Edit: in DIY spirit and as a learning exercise i'm thinking of translating Sedgewick Algorithms from Java to idiomatic functional Scala, if anyone wants to join this effort or aware of similar ones please let me know Edit 2 (in regards to comments on 'reinventing the wheel' below): if Scala is so great as a language and functional programming flagship, where are all the libraries of functionally implemented algorithms replacing conventional CLRS style imperative/mutable implementations?
-
Need suggestions on where and how I can practice functional programming with Scala or in general programming in Scala. New to Scala.
handsonscala is a great read for programming in general using scala. Especially if you're the practical kind of learner.
-
Scala at Scale at Databricks
I will toot the author's horn for him. He has a great series of Scala posts on his blog [1] and his book Hands-On Scala Programming [2] is a great introduction to building real applications with Scala so that any experienced developer can understand and extend them.
I work at a small company that has been using Scala for 7 years. Some of the prior employees clearly enjoyed playing with advanced language features and writing libraries for the most general possible case even when that made it hard to understand how they were used for the 2 actual cases we needed to address in our application code. Akka, Cats, and Shapeless were all over the place.
Those earlier employees have churned off to other places and I have successively simplified the code they wrote that is still useful, while encouraging the use of no more language power than necessary in new development. Hands-On Scala Programming is the book I give new hires as a language introduction that shows the sort of style to be preferred. It's much more like super-powered Python than like Haskell.
I have written C, JavaScript, Python, and Scala for money. When I started on Scala I had never written Java nor used any JVM language. I have come to really appreciate the rich ecosystem of JVM libraries, the instrumentation and profiling tools I get, and many aspects of the Scala language and standard library. I love Scala's collections and miss their power and ease when I'm writing Python. (Which I still do for certain scripting tasks and for accessing Python-ecosystem libraries.)
- Ask HN: Books that teach you programming languages via systems projects?
-
Thats my first time with Scala and wanted to create something interesting as first program, so created simple single colored window in LWJGL (which will turn into traingle), next in my tour is password generator, and then wayland implementetion as generated scala code from XML protocols.
Also, many scala folks are not happy with sbt. There's a new build tool on the block Mill - https://github.com/com-lihaoyi/mill - by Li Haoyi . He's a scala master and he's written a _great_ intro to scala https://www.handsonscala.com/
-
Wkhtmltopdf: Command line tools to render HTML into PDF
I tried using wkhtmltopdf for rendering my book https://www.handsonscala.com/ to pdf, but in general I found it pretty buggy and unreliable. Lines of text would get split between pages, some CSS like flexbox didnt render properly, font sizes and page scaling was sometimes off (e.g. a big image on a page would make everything else shrink), etc. In general it "worked", but it didn't work well.
I ended up swapping in Google's Puppeteer library to render my PDFs, and despite needing a bit of plumbing to get my Scala build script talking to the node.js runtime, in the end it worked much better. Things looked the same in puppeteer PDF as they did in the browser, which is something I could never quite achieve with wkhtmltopdf
What are some alternatives?
WKHTMLToPDF - Convert HTML to PDF using Webkit (QtWebKit)
tinygrad - You like pytorch? You like micrograd? You love tinygrad! ❤️ [Moved to: https://github.com/tinygrad/tinygrad]
athenapdf - Drop-in replacement for wkhtmltopdf built on Go, Electron and Docker
jsPDF - Client-side JavaScript PDF generation for everyone.
b-decoded - arthur whitney's b interpreter translated into a more traditional flavor of C
algs4 - Algorithms in C# ported from the book "Algorithms 4th Edition".
kwkhtmltopdf - wkhtmltopdf server with transparent drop-in client
ZLib - A massively spiffy yet delicately unobtrusive compression library.
kdb - Companion files to kdb+ and q
HexaPDF - Versatile PDF creation and manipulation for Ruby
pagedjs - Display paginated content in the browser and generate print books using web technology
ancient-c-compilers - Very old C compilers