1. 7

    Season 3 of Dark comes out on Saturday (in the US at least), so I’ll be parked in front of the TV for several hours.

    I’ll probably get a round of disc golf in on Sunday. Do we have any European disc golfers here? If so, what’s it like in your area?

    1. 2

      Some cities have some hidden in parks. I have seen some at least in Brussels, Louvain-la-Neuve and Amsterdam. Done it a few time for fun but it is pretty rare hobby around here.

      1. 1

        Are you me (from another dimension/time :))? This is exactly what I’m doing this weekend: watching Dark and playing disc golf!

        Do we have any European disc golfers here?

        Yes, I’m a disc golfer from Europe. What exactly do you want to know, how is it now due to COVID or more in general?

        1. 1

          I was just curious what the scene is like in other countries e.g. how popular is it, are there many courses near you, etc.

          I’ve seen that Sweden and Finland have a huge number of courses, but I don’t know much about the rest of Europe.

          1. 1

            how popular is it, are there many courses near you, etc.

            I can tell you only for Croatia.

            Not very popular here, we have around 40 players on our tournaments (more active players than that, but noting to write home about).
            I have a course about 40 minute drive away from me, and then the next one is 3 hours away :D

            1. 1

              That’s interesting. I live in a small college town and even here there are 5 courses near me, and a handful more in Indianapolis (~1hr away).

              1. 1

                there are 5 courses near me

                We have 5 courses in the whole country!

                Four of which are relatively close to each other (maybe half an hour between each; all ~3 hours away from me), and one is near me. There are some talks about some new courses, but nothing happened yet.

        2. 1

          Totally forgot about the new Dark season, thanks for the reminder!

          1. 1

            I am doing the same on Saturday, rewatched dark a few weeks ago to catch up.

            A second watch of the show was surprisingly illuminating.

            1. 1

              I did my rewatch last weekend. A second watch is definitely interesting!

          1. 2

            We’ve received one additional (awesome) talk, making it total of 15 talks!

            The first talk starts at 11:00 UTC (in 3 hours when this comment is published), and the last one finishes around 21:00 UTC.
            These 10 hours include time for questions, breaks, etc.; if you watch all the talks at some later time back to back, it is a bit more than 6.5 hours of just talks.

              1. 3

                Same here :)

              1. 7

                Modern buildings use just enough material to fulfill their function and stay safe under the given conditions.

                The hell they do. “Safety factor” is a thing, and it’s not thrown around lightly.

                Also, given conditions are a start. They have to weather the elements, which are never a given.

                1. 21

                  enough material to fulfill their function and stay safe

                  The hell they do. “Safety factor” is a thing, and it’s not thrown around lightly.

                  Civil engineer here.

                  What I think was meant: after safety factor and all other considerations were taken into an account, say you get that your minimal cross section should be 191 cm2. You would round it up to 200 cm2 to be (a bit more) on the safe side, and use that.
                  You cannot eye-ball it without a calculation and then say “I’ll use 5000 cm2 cross-section, that should do it”.

                  1. 5

                    Factors of safety are what let us use the minimum of material. If we didn’t bound the upper limit of FoS, for example, every parking garage would be a tremendous pile of concrete instead of decked slabs and trusses.

                    Elementary are also a given, roughly. That’s why Galveston beach houses are on stilts (and are cheaply enough built to be replaced when the occasional hurricane overpowers them) and why skyscrapers in places with strong winds may have active compensation to offset oscillations due to gales.

                  1. 1

                    I think you mean Rosetta code?

                    I have a similar project, 94 tasks currently:

                    https://cup.github.io/autumn

                    1. 2

                      I think you mean Rosetta code?

                      Of course! Thanks for spotting the silly mistake, now I changed the title :)

                    1. 2

                      I’m on a long vacation, so that means only one thing: solving AoC 2019! (Here’s a link to my solutions in OCaml)

                      1. 4

                        I’ve built my computer literally yesterday, after ~10 years.

                        Specs: AMD Ryzen 3700x, 32 GB RAM, 500 GB NVMe SSD, AMD RX 590 GPU. I’m running Manjaro Linux with i3wm on it.

                        1. 1

                          what mobo did you choose for ryzen 3700 ?

                          1. 1

                            I went with Asus TUF X570-plus gaming, because I got a recommendation for it.

                        1. 21

                          It’s also a nice way to get a daily warmup

                          Don’t be fooled: You will not just solve tasks and be over with it. There will be tasks that you’ll think about all day and you won’t be able to think about anything else. And you’ll love it :)

                          1. 4

                            I’m not a programmer, and spent ten hours last year on day three trying to solve the puzzles before giving up. A word of advice: if you can’t figure a puzzle out, just move on and work on the next day’s. It’s better than wasting time on one puzzle for a week.

                          1. 6

                            I’m continuing my Advent of Code November warm-up by making my first steps in OCaml, which is the language I plan to use for this year’s AoC.

                            I’m solving/publishing one AoC 2017 task per day, so currently I’m on Day 15 (link to my repo).
                            So far I have been pleasantly surprised with OCaml, especially when it comes to performance: it is on the same level as Nim, which is impressive. The only task so far which is an order of the magnitude slower than Nim version is Day 13, and I’m not sure what might be causing it.

                            The plan for this weekend is to learn more OCaml, continue to solve AoC tasks, and maybe revisit the already solved ones to see if/how can I improve them. (It is a rainy weekend here, no outdoor activities planned.)

                            1. 1

                              I should really try to finish up the stuff I have left from last year, but frankly I feel that it was the year that the contest ran out of good problems and started replacing them with pointless busy-work. I’ll probably look at the first weeks of this year but I’m going to dial my goals way back.

                              1. 1

                                I feel that it was the year that the contest ran out of good problems and started replacing them with pointless busy-work.

                                I feel the same way about AoC 2018: it was the least interesting so far for me, and to this day it remains the only edition for which I didn’t solve all 25 tasks. (I especially hate Day 15)
                                That’s the biggest reason why I’m doing this warm-up with 2017 edition.

                                I hope that this year we’ll see the return of “good old AoC”.

                                1. 2

                                  I’m stuck on Day 24 from last year, and it feels a lot like work. And not fun work, but just meh. Still, I’ll give 2019 a shot, but I’m not going to beat myself up if I don’t finish.

                            1. 7

                              I decided I’ll try a new language for this year’s Advent of Code, so I’ll move away from my usual picks: Nim and Python. I chose OCaml, since I really like F# but I couldn’t make it as usable as I would like on Linux.

                              For a November warm-up, I decided to use OCaml for AoC 2017 tasks, so I’ll be updating my existing AoC 2017 repo with OCaml solutions. These are my first steps in OCaml, so if anybody has any advice on how to improve my solutions, please let me know.

                              1. 2

                                Best of luck! I used OCAML to get into F# when it first came out.

                                I guess the problem you have with F# is development in linux? I eventually settled on developing in windows and then moving the files over for deployment, but if I started today I might give VSCode in nix a chance. Interested in hearing how your experience goes.

                                1. 2

                                  I guess the problem you have with F# is development in linux?

                                  Yes, I have tried it about a year ago and I didn’t like I needed Mono to make FSI work. But I’ve heard that .net core 3 should make FSI possible without Mono. Maybe I’ll give it another try in 2020.

                                  As far as OCaml goes, I find the experience superb. utop is such a nice REPL, and I could be productive using NeoVim in no time (merlin and ocp-indent are great).
                                  (But I still like the looks of F# programs more, it feels nicer and more elegant)

                                  1. 2

                                    I managed to get utop running on my Windows machine once when trying to dabble in OCaml, and I had my mind blown. I hold it as the best repl I seen for now in my life. If Nim had such an amazing REPL, wow… one can dream ;)

                                    1. 2

                                      Yes, I have tried it about a year ago and I didn’t like I needed Mono to make FSI work.

                                      What’s wrong with Mono?

                                      1. 1

                                        I dodged JVM and .NET in the past since they were large runtimes vs a memory-safe language with little to no runtime footprint. Maybe they shrunk them or have tools to since then.

                                        What’s Mono currently like in terms of dependency size for the app? And how much is unsafe code?

                                        1. 2

                                          Disclaimer: I don’t have a constant eye, this is my understanding. Mono and Core are moving towards moving more into pure managed code or commodity libraries with ideally amortized security costs. Core tries to use modern C++ when possible for safety, Mono is considering rewriting some components in Rust (though that makes my thing much harder!).

                                      2. 1

                                        I did mono at first too. Great job and hard work those guys have put in.

                                        I’m all .net core now, though. It just works everywhere.

                                        I found that I eventually started thinking of F# apps as all being unix-style commands. This eliminated several entire categories of PITA that I would normally have to put up with, and I was still able to do whatever I wanted. I love all of the tooling and fameworks that are out there, but it’s quite easy to get “upside down” in a project and spend more time on the tools than you do the problem. YMMV.

                                        1. 2

                                          While we’re discussing F#, let me ask you: are there F# books, tutorials, or some other learning material which doesn’t assume you have previous C# (and .net in general) experience? Most of the things I found were along the line “how to rewrite your C# stuff in F#”.

                                          1. 1

                                            I don’t know. If that’s true, it must be a marketing thing. Perhaps the most lucrative audience are the current C# guys looking to try new stuff?

                                            That leads me to the next question, coming from where? BASH-like script experience? Java? PHP? Any coding at all? Can you work an IDE, set up a project, etc.

                                            30 years ago, when I taught myself C++, I started with the “How to program” books with just C, even though I already knew how to program. After a few of those, then I moved to the C++ books. Same with F#. I started with OCAML, but heck, there weren’t any other books out there back then. Surely somebody has a getting started with F# book, right?

                                            For what it’s worth, I hang out in various F# forums from time-to-time. While I love the community, and I think F# and .net core are the go-to for most large solutions right now, I found that a lot of folks publish material that looks more like they’re trying to impress the other F# coders than teach anything. There’s a lot of pointy-headed “let’s do something that looks really cool using obscure language features people will be amazed at!” content going around. (Having said that, most all of them are also great for helping out new folks, as opposed to some of the other language communities) Some of them are also trying to reinvent MDD, but that’s a longer story.

                                            Best of luck! Ping me if I can help any.

                                      3. 2

                                        Note that Windows support in OCaml has improved a lot in the last few years. OPAM works on Windows (https://fdopen.github.io/opam-repository-mingw/installation/). It still needs Cygwin to work (bundled with that OPAM installer), but compiled executables are pure Windows PEs.

                                        There’s also an option to cross-compile to PE executables on Linux (https://github.com/ocaml-cross/opam-cross-windows), though the cross-repo is not very complete yet, but the point remains—you can develop for Windows without Windows.

                                    1. 5

                                      and on the developer experience? is the compile time bearable? How’s editor integration, can there be some sort of a repl? How are the error messages? thanks

                                      1. 4

                                        How’s editor integration

                                        I think that the most Nim developers are using VS Code. I personally use NeoVim with this plugin, which, IMO, makes the experience even better than the one in VS Code.

                                        Fun fact: three core developers use three different editors: VS Code, Emacs, NeoVim.

                                        1. 1

                                          It has a kinda proto-repl feature called “hot code reloading”. It needs some initial setup, and doesn’t give you the typical repl experience as is, but most certainly should allow for live coding (I haven’t tried it myself yet), thus I assume it qualifies at least as “some sort of repl”? :)

                                          1. 0

                                            The VS code integration is quite nice. I’ve had fairly good experience with error messages. The compile time is very low, and seems to be less than Go’s compile time, at least it feels that. There can be a REPL of sorts, if you type nim secret, but it’s not a fully featured thing.

                                          1. 18

                                            Shameless plug - I interviewed Andreas, the creator of Nim, about his philosophy and design choices here: https://sourcesort.com/interview/andreas-rumpf-on-creating-and-growing-nim

                                            Might be an interesting read for people who are thinking about using Nim and wondering how it compares to the C family, Python, Go, etc.

                                            1. 6

                                              I love his final words:

                                              creativity is often the result of constraints.

                                              Nice small interview by the way :)

                                              1. 4

                                                Very interesting read. Definitely makes me more interested in trying out Nim. He said he works full-time and has two other programmers working on it too. Where does the money come from for this?

                                                1. 9

                                                  Where does the money come from for this?

                                                  One year ago Nim partnered with Status, see the article about this partnership.

                                                2. 0

                                                  Nim’s long development process and growing community also mean that Nim is mature

                                                  A-ha-heh… um… When I looked, the package/library ecosystem doesn’t hold a candle to, say, RubyGems or npm. (Not hating on Nim, just saying.)

                                                  1. 3

                                                    Maybe mature doesn’t mean that there is a package for everything, but rather the packages are not buggy.

                                                1. 10

                                                  I’d love to see some code snippets to help me understand what made Nim so effortless as compared to a ‘scripting’ (god I hate that term :) language.

                                                  1. 7

                                                    I can give a couple small examples of toy tings I’ve done at work:

                                                    This is a program that prints out each directory in $PATH on it’s own line.

                                                    import os, strutils
                                                    
                                                    var path = getEnv("PATH")
                                                    echo path.replace(";", "\r\n")
                                                    

                                                    This is a program the spits out 5 lines of the character “-”, with a specified background color.

                                                    import terminal, strutils, os, tables
                                                    var color = "green" 
                                                    
                                                    var colorTable = newTable[string, BackgroundColor]([
                                                        ("black", bgBlack),          
                                                        ("red", bgRed),                 
                                                        ("green", bgGreen),               
                                                        ("yellow", bgYellow),              
                                                        ("blue", bgBlue),                
                                                        ("magenta", bgMagenta),             
                                                        ("cyan", bgCyan),                
                                                        ("white", bgWhite)
                                                    ])
                                                    
                                                    
                                                    if paramCount() > 0: 
                                                        color = paramStr(1)
                                                    if color.toLower in colorTable:
                                                        setBackgroundColor(stdout, colorTable[color], false)
                                                    
                                                    for i in 0..5:
                                                        echo "-".repeat(terminalWidth() - 1)
                                                    resetAttributes(stdout)
                                                    

                                                    The key point as far as executables are concerned is that, unlike Go, C#, or Java, is that both of these files are one invocation of nim c filename.nim away from being executables that I can then copy into my $PATH. Compilation times for me are under 10 seconds, which isn’t instant, but is faster than Go or C# in this case. VS Code gives live error updates as well.

                                                    Go, for comparison, requires that you have a func main(), and that there is only one instance of main in a given folder. C# requires either MSBuild or understanding how to pass dependencies to csc.exe, and then you usually have to have a lot of DLLs around. Python and Ruby can both use Shebang files to achieve similar concision, but then if you have multiple files, shebang lines don’t bundle them up for you, and you’re outside of the easy/obvious path for executing code in those languages.

                                                    1. 7

                                                      Compilation times for me are under 10 seconds

                                                      Something is wrong here. If it takes multiple seconds to compile these examples (or any similar relatively simple “script”), can you check with nim -v if your compiler is compiled in the release mode? You should see the line active boot switches: -d:release in there.

                                                      I have a ~10 year old CPU and I have never seen such slow compilation times.

                                                      1. 4

                                                        These compilation times are on Windows, running inside the VS Code PowerShell prompt.

                                                        I’ll check more next time I’m editing the programs, but like I said, they feel pretty zippy compared to Go’s compile times.

                                                        1. 1

                                                          running inside the VS Code PowerShell prompt

                                                          Isn’t that a Javascript application? Does the compiler run in Javascript as a result or does it run it as native code? I’m curious since I figure Nim-to-native-code would be best way to benchmark the compiler on a hunch that they optimized the Nim-to-C-for-LLVM part the most.

                                                          1. 1

                                                            There sounds like something really wrong with your Go setup…

                                                            1. 2

                                                              Just fired up a Windows VM to see if Go compile times on it were awful, still well under a second for the 10 line example program (reading path, etc).

                                                        2. 3

                                                          Compilation times for me are under 10 seconds, which isn’t instant, but is faster than Go or C# in this case.

                                                          I don’t know about C#, but I’d be surprised if compiling a similar go program took 10s or more.

                                                          Doesn’t take away how good an alternative Nim can be for short programs like these.

                                                          1. 2

                                                            Go is one invocation of go build filename.go away from being an executable that you can copy into your path.

                                                            package main
                                                            
                                                            import (
                                                            	"fmt"
                                                            	"os"
                                                            	"strings"
                                                            )
                                                            
                                                            func main() {
                                                            	path := os.Getenv("PATH")
                                                            	fmt.Println(strings.Replace(path, ":", "\r\n", -1))
                                                            }
                                                            

                                                            Which compiled on my machine in 0.239s total. I have been a fan of/follow nim since it was nimrod, it is awesome, just wanted to clear up that point.

                                                            1. 1

                                                              For reference, the nim code

                                                              import os, strutils
                                                              
                                                              var path = getEnv("PATH")
                                                              echo path.replace(":", "\r\n")
                                                              

                                                              took .885s to compile (more than 3x slower than Go).

                                                              1. 2

                                                                Ah, perceptions for me might be off. The Nim compiler is a lot noisier than the Go one.

                                                                1. 2

                                                                  Could also be a Windows thing – never used the go toolchain on windows.

                                                                  1. 1

                                                                    Yeah. Well, I’ve almost never witnessed subsecond compiles for the Go or Nim toolchains. My powerful hardware is on Windows, where file access seems to be just slow enough to make things slower. My Linux hardware is an oldish VPS that I probably need to migrate to a newer machine, and which is sharing hardware with other VMs.

                                                              2. 0

                                                                Now, can you have 3 of those, all with “func main” in them, that can depend on other files in the same folder, without having to massage how you ask Go to build the files?

                                                                It’s not that you can’t make small things in Go, just that it’s easier to do so in Nim. 10 lines vs 3 lines, in this case.

                                                                At any rate, if you like Go, feel free to keep using it. I happen to like Nim’s ergonomics better.

                                                                1. 1

                                                                  10 lines vs 3 lines, in this case.

                                                                  Of which I ended up writing 4 (could have been 3 if I used an auto-closer for {}). With my very basic tooling, in an esoteric editor (Kakoune), imports were added automatically, as was package main. So in terms of ergonomics, it was basically a wash.

                                                                  Now, can you have 3 of those, all with “func main” in them, that can depend on other files in the same folder, without having to massage how you ask Go to build the files?

                                                                  No… but why would I want to? I mean, as criticisms go, I don’t entirely understand this one. The use case is writing multiple files that act as both entry-points and libraries in the same directory with circular dependencies?

                                                                  1. 2

                                                                    It’s less “Go sucks” and more “I like how Nim structures its projects in the small better than Go”

                                                                    I don’t think Nim makes it easy to get circular dependencies.

                                                                    For me, it’s like getting a /cmd directory without having to manange two levels of directory heirarchry to do so.

                                                                    My first real project in Nim was https://idea.junglecoder.com/view/idea/277 which was half the lines of Go version. That was mostly down the Nim standard library is containing a type to do what I wanted (a key/value collection that remembers insertion order). In Go I had to roll my own.

                                                                    I will fully admit to not being the world’s most effective Go programmer. Nim fits how I think a bit more comfortably, and it puts enough less friction into building small things that I’ve made a lot more of them in Nim of late.

                                                              3. 1

                                                                The key point as far as executables are concerned is that, unlike Go, C#, or Java, is that both of these files are one invocation of nim c filename.nim away from being executables that I can then copy into my $PATH. Compilation times for me are under 10 seconds, which isn’t instant, but is faster than Go or C# in this case. VS Code gives live error updates as well.

                                                                OK this makes sense to me, and since we’re talking about preferences and subjective squishy things like what it ‘feels’ like to develop in a language, I won’t argue your point, but compare and contrast that experience to no compile step at all and I see a fairly strong argument for continuing to love my Python while respecting that these tools are all incredible in their own right and do indeed provide a considerably faster execution path for the majority of code cases.

                                                                1. 1

                                                                  Indeed. If you’re wanting to run/compile at the same time, there is nim c -r filename.nim which will run it after compilation.

                                                                  If you’re already happy with Python, however, Nim may not do anything too amazing for you, other than potentially being a bit easier to distribute, (that’s just a guess on my part, however. I’ve had issues trying to distribute python programs in the past, specifically pygame, but it’s been a while since I’ve tried to distribute python software).

                                                                  Nim also has static typing baked in, which I like. I know python has some static typing tools built in these days as well, but yeah.

                                                                  1. 2

                                                                    Python’s distribution story is a known issue. There are various efforts afoot to improve things, but none of them are in core.

                                                                    There’s no doubt that languages like Nim, Go, C/C++ and Rust have advantages in that department.

                                                                    Tools are all about trade-offs :)

                                                            1. 4

                                                              I’ve seen and used a lot of attempts to get a real vim experience into browser over the years, this is by far the best attempt yet.

                                                              Instead of emulating keybindings and trying to replicate something in the browser or copying content back and forth from an editor in another window, it actually uses a headless Neovim instance and draws the external interface in the browser. This gives you your full editor including all plugins and bindings, natively anywhere there was a textarea.

                                                              The only catch (and this only applies to Firefox and not Chrome) is that CTRL-W can’t be caught and mapped to vim’s default delete word, it closes the tab instead.

                                                              1. 3

                                                                Instead of emulating keybindings and trying to replicate something in the browser or copying content back and forth from an editor in another window, it actually uses a headless Neovim instance and draws the external interface in the browser. This gives you your full editor including all plugins and bindings, natively anywhere there was a textarea.

                                                                I’m super-happy that Neovim chose to architect their project in this way, making these kinds of embeddings in software that is not primariy for text editing possible.

                                                                1. 1

                                                                  this is by far the best attempt yet.

                                                                  These words motivated me to install Firenvim and give it a try.

                                                                  The plan was to just write here “this comment is written via Firenim” to see how it works, just to realize that Firenim works if I want to have ‘global comment’ (reply box at the top of the page), but the textbox for replying to an existing comment doesn’t trigger Firenim. (this is on Vivaldi, if that matters)

                                                                  1. 4

                                                                    Works for me on firefox, but it might be because I have disabled autofocusing elements. You can also manually enable firenvim on an element, you can use <C-e> (this can be configured in chrome://extensions or about:extensions, not sure what the equivalent is on Vivaldi). I should probably document this feature somewhere.

                                                                    1. 2

                                                                      It does not work for me on Firefox either, the same monkey business with focusing elsewhere and back is needed to make it show up. I’m going to guess whatever you’ve done to disable autofocusing elements has changed that behavior. By the way, how did you do that? That sounds like something I would like too!

                                                                      1. 2

                                                                        I have browser.autofocus set to false is about:config and I also set tridactyl’s allowautofocus setting to false.

                                                                        1. 2

                                                                          Holy cow Tridactyl has come a long way since the last time I gave it a test drive! Thanks again for this tip, it is now by default Firefox UI and I’m working on configuring it to taste.

                                                                          1. 1

                                                                            I tried browser.autofocus already, that doesn’t affect this issue. I’ll have to look into what tridactyl is doing and either use it or try to replicate just that feature (I have most recently been using saka-key for vim-like navigation features).

                                                                      2. 2

                                                                        This reply written in Firenvim (Chrome).

                                                                        I actually had the same problem you describe initally and was surprised since the textarea has just about the same properties as the one above. Then I clicked away for a second and came back and it worked.

                                                                        I suspect what is happening is the hook that’s grabbing focus events for texarea tags is not getting set on the dynamically generated textarea here in replies. It does eventually find it, just now when it is created.

                                                                        I will open have opened this as a bug report on Firenvim’s issue tracker.

                                                                    1. 3

                                                                      Congrats, but I have to ask: why such a tiny default font? To be able to comfortably read the contents, I need to have 140% zoom.

                                                                      1. 1

                                                                        It’s designed as a clone of Hacker News. To evolve from this, also from a frontend point of view, is on my list ;-)

                                                                        1. 2

                                                                          Too bad you didn’t use lobsters to do that! We would have had another sister site!

                                                                          Anyway good job and good luck with this project!

                                                                          1. 6

                                                                            I considered this. But I thought a python site cannot be done in Ruby ;)

                                                                      1. 5

                                                                        I had a great fun at my first ever disc-golf tournament a month ago, and that means: this weekend I’m playing another one :)

                                                                        This time it will be on the course I’m not familiar with so I have no idea how good/bad can that go. My goal for this tournament: don’t be in the last 3 players.

                                                                        1. 1

                                                                          Oh, that sounds like a fun and easy sport to get into.

                                                                          1. 1

                                                                            If you like outdoors, it is a no-brainer, IMO. Definitely give it a try.

                                                                            Everybody can play, regardless of their skill or fitness level. Other than discs, no special (read: expensive) equipment is needed. And based on my current experience (and confirmed by others that it is really the case generally): the players are really nice and friendly, regardless of their/your skill level.

                                                                        1. 3

                                                                          Working to update Zagreb bus routes on OSM so that OsmAnd can use them for the newly added public transport routing. Still not certain which nodes are required and which optional, so it will be a bit of trial and error.

                                                                          1. 1

                                                                            Does ZET give those information freely to the public (and/or) in some usable format, or are you doing that manually?

                                                                            Pozdrav iz Rijeke :)

                                                                            1. 1

                                                                              Surprisingly enough, the answer is yes. :)

                                                                              However, most of the stops are already entered, I need to update the tags and some other stuff which cannot be easily automated unfortunately.

                                                                          1. 18

                                                                            It’s nice to see someone else abusing Python for the sake of fun. I’ve blogged in the past about many hacks, including: let, attempting to make call/cc, worlds, pattern matching with with, and dispatching with with. Basically, yes, yes, yes, more of this kind of stuff! It makes languages really fun.

                                                                            1. 6

                                                                              I’ll join this party :) I figured out how to make Rust-like macros in Python by stuffing things in type-annotations, which you can read here.

                                                                              1. 1

                                                                                I don’t write much Python these days, but as a Schemer interested in macros, I used to try out all sorts of stuff. There was one really good attempt: MetaPython which hasn’t had a release since 2009. I think that was the one I felt worked best, so if you’re still interested, you might play with it.

                                                                                Also, this is awesome! And, I don’t know much rust, but I did not realize that what I would call “pragmas” are powered by macros (in hindsight this makes total sense!), making them accessible for all sorts of hackery and wizardry. Thanks for sharing!

                                                                                1. 2

                                                                                  … but as a Schemer interested in macros

                                                                                  Do you know about Hy?

                                                                                  1. 1

                                                                                    I do! A long time ago I had a similar project called Ruse, which aimed to be a compliant Scheme on top of Python 2, which fizzled before I prepped it for release. I’m happy that someone else, independently, thought the idea of a Lisp targetting Python was good. :)

                                                                              2. 3

                                                                                It sounds like you’d enjoy my (now quite old) blog post about abusing encodings in Python: http://benjiyork.com/blog/2008/02/programmable-python-syntax-via-source.html

                                                                                1. 3

                                                                                  Thanks, that is amazing.

                                                                                  Very relatedly, I blogged about sourefiles using built in rot13 with a starting comment #encoding: rot13 that then have all Sourcecode encoded: https://frederik-braun.com/rot13-encoding-in-python.html

                                                                                2. 1

                                                                                  I think you might enjoy the complete works of Oleg Kiselyov, full of mind-bending trickery in Scheme, ML and others. I sometimes wish I could just set aside a year and thoroughly study and understand what Oleg is publishing.

                                                                                  1. 2

                                                                                    I sometimes wish I could just set aside a year and thoroughly study and understand what Oleg is publishing.

                                                                                    I sometimes ask the question, legitimately, “What would Oleg do?” – Yes, aware. But similar to you, completely understudied due to time.

                                                                                1. 4

                                                                                  Congrats to the contributors, looks like a lot of efforts have been put into it :)

                                                                                  Genuine question: what are the “not so good” part of using Nim today ? I would really appreciate your feedbacks :)

                                                                                  1. 5

                                                                                    what are the “not so good” part of using Nim today ?

                                                                                    This is an interesting question, and I hope more Nim users will give their opinion.

                                                                                    Here is a short personal list, from the top of my head:

                                                                                    • stuff in the experimental manual is… well… experimental, and as such it is not polished, and you might hit some rough edges (pro tip: just don’t use concept and you’ll probably be fine)
                                                                                    • the documentation has been greatly improved from what was there a year ago, but it could always be better
                                                                                    • the situation with learning resources has also improved, but for example I haven’t seen many video tutorials
                                                                                    • relatively small amount 3rd party packages (around 1000 packages currently available)
                                                                                    • nimsuggest (tool for code completion, used by various editors) can consume large amounts of memory, which is annoying
                                                                                    • no big-corporate backing, which limits the amount of people working on the development
                                                                                    • after you use Nim for some time, you might like it so much that you don’t want to go back to your previous language(s) :)
                                                                                    1. 3

                                                                                      To add to this:

                                                                                      • also had problems with nimsuggest hanging/“thinking” for much too long, such thst I basically find it unusable in my vim setup
                                                                                      • it has exceptions, which in my opinion is a plus when prototyping, but a minus if I wanted to write stable final apps (coming from Go)
                                                                                      • the compile-time Nim interpreter (a.k.a. VM) has more bugs than the regular compiler, thus some advanced macros I want to write are not yet possible (though I can still write many macros well enough)
                                                                                      • the standard library feels less consistent and polished to me than that of Go (but then, I have yet to see a language with a standard library of quality matching that of Go)
                                                                                      • spec is more complex that in Go, and with more special cases (though written in a very approachable style)

                                                                                      Still, I find the advantages heavily outweigh the issues already, and hopefully situation will only improve. Personally, I find Nim to be an absolutely unparalleled choice for prototyping.

                                                                                      1. 2

                                                                                        I basically find it unusable in my vim setup

                                                                                        I’m using NeoVim with this plugin and the experience has been great. I find it working better than the usually recommended combo, VSCode + Nim extension.

                                                                                        1. 1

                                                                                          Hmmm; now that I think of it, it may well be because I am by default using {.experimental: "codeReordering".} in all my projects; maybe this pushes nimsuggest out of balance?

                                                                                  1. 21

                                                                                    See also Araq’s personal blogpost about v1.