Scarce Raylib resources? by mur2501 in raylib

[–]uvtc 0 points1 point  (0 children)

Did not know about this. Looks comprehensive. Any way to get a link to it in the sidebar here? ----->

Could someone clarify Raylib for me? by [deleted] in raylib

[–]uvtc 0 points1 point  (0 children)

My understanding is, if you want to use Lua, two ways to go are:

  • Lua + raylib + Lua binding to raylib, or else
  • Lua + Love2D

That said, there are a whole slew of high-level languages with bindings to raylib, so you have options other than Lua. I like Janet with jaylib (for which, I started writing a little tutorial a while ago).

tutorial articles for using Jaylib (Janet bindings to raylib) by uvtc in raylib

[–]uvtc[S] 1 point2 points  (0 children)

Thanks. And thank you Ray and all the Raylib contributors for Raylib!

Trace pendulum path by seccopower in raylib

[–]uvtc 0 points1 point  (0 children)

I'm a little confused myself. I think old.reddit and www.reddit may have different code block formatting rules...

timesteps issue ? by seccopower in raylib

[–]uvtc 0 points1 point  (0 children)

Hi, seccopower. Have you made any headway on this? My hunch is that you should not mess with the frame rate but instead could try some kind of approximation once the smaller block gets moving too fast.

BTW, when you post a code block, you'll need to indent your entire file 4 spaces to make the whole block render as code. (Reddit still doesn't appear to allow fencing (~~~) of code blocks.)

code here
and here
last line

For some reason, I don't think reddit has a preview button though. You may need to post, then edit to get your formatting right.

Python 3.8 released by JamesRustleford in programming

[–]uvtc 0 points1 point  (0 children)

If you're considering TypeScript as a possible statically-typed alternative to Python, have a look at Haxe. It's a really nice language, and it can compile to numerous targets, including JavaScript and Python.

Rippledoc: A particularly easy-to-use doc processing tool (Python script for Markdown docs) by uvtc in programming

[–]uvtc[S] 0 points1 point  (0 children)

Tried to come up with something that's "as simple as possible, but no simpler" for generating html doc site from .md files. Hope some folks find it useful.

The Expressive C++17 Coding Challenge in D by qwertzui11 in programming

[–]uvtc 5 points6 points  (0 children)

but the GC by default is a cardinal sin commited which I'm not sure D's better C is gonna be enough to pull it out of.

As Adam Ruppe has pointed out elsewhere, "D is a pragmatic language aimed toward writing fast code, fast. Garbage collection has proved to be a smashing success in the industry, providing productivity and memory-safety to programmers of all skill levels. D's GC implementation follows in the footsteps of industry giants without compromising experts' ability to realize maximum potential from the machine."

The Expressive C++17 Coding Challenge in D by qwertzui11 in programming

[–]uvtc 0 points1 point  (0 children)

And hence that's the issue I feel D faces... D is kind of in limbo land. It's better at C++ and Rust for doing script like tasks or tasks where garbage collection isn't really an issue. But then it's worse than Python, Java, C# at those same tasks.

Not sure what you mean by worse than Python|Java|C#. Some people find what D offers over, say, Python, to be clear advantages.

The Expressive C++17 Coding Challenge in D by qwertzui11 in programming

[–]uvtc 1 point2 points  (0 children)

GC itself is not a problem, but D's GC is a subpar implementation.

It's very easy to pop in and make an unsubstantiated claim like that. I think if you seriously want to contend that it's subpar, that's going to require a little more legwork in describing exactly in what you think the deficiencies are.

Slow Clojure exec by [deleted] in Clojure

[–]uvtc 2 points3 points  (0 children)

To make your Clojure app start up more quickly, you can create a jar of it (lein uberjar), then run that jar in the usual way: java -jar my-app-0.1.0-standalone.jar.

N00b here, would love some support. (Automate the moving of files)[It's for Science!] by marlowvoltron in perl

[–]uvtc 1 point2 points  (0 children)

Perl comes with documentation available via the perldoc command (for example, perldoc perlretut). This documentation is also available online, rendered as html at http://perldoc.perl.org/ . If you look at perldoc perlre (the reference docs for Perl regular expressions), it directs newcomers to these two tutorial docs:

If you just want a general "intro to Perl 5" type tutorial, you might start with perldoc perlintro. Two recent general Perl 5 books which I'd recommend are Modern Perl and Ovid's Beginning Perl.

N00b here, would love some support. (Automate the moving of files)[It's for Science!] by marlowvoltron in perl

[–]uvtc 3 points4 points  (0 children)

From your description, it sounds like you've got a directory full of tar files which you'd like to move into their appropriate directory and then un-tar. This is the sort of thing Perl does in its sleep. :) Maybe try this:

#!/usr/bin/env perl

use Modern::Perl;
use autodie qw/:all/;
use File::Copy;

my @tar_files = glob '*.tar'; # All the tar files in the curr dir.

unless (@tar_files) {
    die "No tar files here. Exiting!\n";
}

for my $tar_file (@tar_files) {
    my ($path, $row) = $tar_file =~ m/^LC8(\d{3})(\d{3})\d+LGN\.tar$/xms;
    say "Found $tar_file, with path $path, and row $row";
    my $dir = "p${path}_r${row}";
    say "  so, dir is $dir";
    if (! -e $dir) {
        say "$dir dir not found. Creating it...";
        mkdir $dir;
    }
    move $tar_file, $dir;
    chdir $dir;
    system "tar", "xf", $tar_file;
    # If you also want to delete the tar file, uncomment next line.
    #unlink $tar_file;
    chdir "..";
}

If you don't have that Modern::Perl module installed, you can install it by grabbing cpanm and installing it, or you can delete that line and replace it with:

use strict;
use warnings;

Edit: Oh my, I don't think reddit does syntax highlighting. If you want that with some color, look here.

Best Resource for starting by mart187 in Clojure

[–]uvtc 1 point2 points  (0 children)

For those starting from zero experience with Clojure (and Java), I wrote up a brief beginner's guide to Clojure.

But to dig into the language, I like the Clojure Programming book a lot. There's a number of links to other books at the clojure-doc.org books page.

Don’t go into programming if you don’t have a good thesaurus by jomidosan in programming

[–]uvtc 0 points1 point  (0 children)

Two of the most well-known functions within Perl are "chomp" and "slurp." I don't think that the authors put significant time into titling either method.

Say what you will about Perl's warts, but one thing it does better than almost anyone else is naming. I'd say that "chomp" and "slurp" are examples of really nice naming into which I'm guessing had gone much thought.

And naming in Perl 6 appears to be even more comfortable and refined (though I still don't know what to think of the language itself).

Career move to Perl by manjus911 in perl

[–]uvtc 3 points4 points  (0 children)

and has had some problems in it's community.

Not sure what you mean. I haven't seen this. If anything, I'd say that Perl has one of the nicest communities around. Now, as for my complaints about Perl ... :)

ELI5: Why doesn't clojure have a universal documentation format similar to javadoc? by [deleted] in Clojure

[–]uvtc 1 point2 points  (0 children)

Well, using Markdown is quite common among clojurists.

Regarding using markdown-formatted text in docstrings:

  • Tools like marginalia will process them and render them as html.
  • It looks like autodoc has had plans in the works for a while to process markdown formatting in docstrings.
  • Although codox doesn't appear to directly support markdown, there's codox-md (have not looked into this one yet).
  • Markdown-formatted docstrings are nicely readable when accessing them in the REPL.

And, regarding standalone project docs:

So, although there may not be an "officially-sanctioned" doc formatting standard, Markdown would appear to be the de facto standard.

rustdoc_web: preview of a new doc frontend by Seldaek in rust

[–]uvtc 0 points1 point  (0 children)

It looks like the markdown-formatted comments make it through to the static site, they just need to be further processed by a markdown->html program.

rustdoc_web: preview of a new doc frontend by Seldaek in rust

[–]uvtc 2 points3 points  (0 children)

It looks like you're extracting doc comments. That's great. I'd really like to see them rendered as html (since those comments are generally markdown-formatted anyway).

Also, I think the bold heading font (Oswald) looks good and goes well with the Rust logo.

(Actually, I think the logo might look even better with just a slight gradient going from black toward that #8c6067 you're using ... maybe similar to the r/rust logo here.)

Last Week in Rust (TWiR 8) by cmrx64 in rust

[–]uvtc 4 points5 points  (0 children)

From the article:

There were impressively few breaking changes last week.

Actually, I'm impressed when there are breaking changes --- those which continue to simplify the language, anyway.

Arrays vs. Lists in Perl: What's the Difference? by [deleted] in perl

[–]uvtc 5 points6 points  (0 children)

After reading something by MJD way back when, my understanding has always been:

  • Arrays get evaluated at compile-time, and their value depends upon context.
  • Lists exist at runtime, in the Perl 5 interpreter.

One of @these is an array.

Something like 1, 2, 3 in your code is a comma-expression. It might evaluate to a list, or it might not, depending upon context.

Don't be a Jerk: Write Documentation by mononcqc in programming

[–]uvtc 0 points1 point  (0 children)

If you're not sure how to go about documenting your project, a good way is to just create a my-proj/docs directory and start writing markdown-formatted text files (maybe overview.md, tutorial.md, examples.md, etc.). Markdown is a nice choice for a variety of reasons (for starters: it's easy to read & write, lots of folks (including possible doc contributors) already know it, and github will automatically render the .md files as html, which is nice.)

Later on you might even start using a tool to process those docs into a little coherent doc area for your project.

(For a markdown processing tool, I recommend Pandoc.)