[HN Gopher] Picolisp a Railroad Simulation
       ___________________________________________________________________
        
       Picolisp a Railroad Simulation
        
       Author : todsacerdoti
       Score  : 77 points
       Date   : 2024-06-23 14:16 UTC (8 hours ago)
        
 (HTM) web link (picolisp-explored.com)
 (TXT) w3m dump (picolisp-explored.com)
        
       | taddevries wrote:
       | I'm just gonna say that I belive Factorio is the best railroad
       | simulator. Second only to OpenTTD.
        
         | nalzok wrote:
         | How do you like Simutrans? https://www.simutrans.com
        
           | TylerE wrote:
           | I can't stand it because of the insanely low built in fixed
           | framerate. It's something weird like 20fps. UI responsiveness
           | is also terrible for the same reason, because everything is
           | apparently spaghetti coded together and the game logic is
           | tied to the framerate.
        
         | ssl-3 wrote:
         | Factorio is a wonderful video game that includes aspects of
         | using railroads, but it is not a simulation of how railroads
         | work on Earth.
        
           | MadnessASAP wrote:
           | It is however a simulation of how railroads work as
           | predators.
           | 
           |  _Choo Choo_
        
         | xedrac wrote:
         | Factorio's railroads are so fun to build and play with. Add a
         | circuit network and robots to the mix, and you have yourself
         | endless hours of enjoyment. I eagerly anticipate the release of
         | 2.0 this fall.
        
         | jjmarr wrote:
         | Factorio is a bad railroad simulator because you cannot do
         | grade separation (bridges or tunnels). This means all of your
         | rail networks are artificially limited to being planar graphs
         | which kills your throughput.
         | 
         | OpenTTD allows grade separation at least but imho is inferior
         | to Simutrans which ensures cargo and passengers have
         | destinations and will not use your network unless you can path
         | them to their destination.
         | 
         | Because OpenTTD doesn't have this it devolves into forcing
         | cargo or people to travel the longest possible distance for the
         | most money, instead of to where they actually want to go.
         | 
         | Simutrans-extended is something I'm really hyped for because
         | the simulation of passenger desires is even more in-depth than
         | the original.
         | 
         | https://simutrans-germany.com/wiki/wiki/en_extended_Passenge...
         | 
         | The most satisfying rail network for me is one that has both
         | complex form _and_ function.
        
           | eterm wrote:
           | You'll be pleased to hear Factorio 2.0 is adding a second
           | rail layer: https://www.factorio.com/blog/post/fff-378
        
           | NoboruWataya wrote:
           | OpenTTD does have this: https://wiki.openttd.org/en/Manual/Pa
           | ssenger%20and%20cargo%2...
        
             | jjmarr wrote:
             | Cargodist isn't the same as what I'm describing. It creates
             | destinations for cargo and passengers based on the existing
             | network you have. In other words, "demand" is changed to
             | fit your playstyle.
             | 
             | In regular Simutrans, passengers want to go to a specific
             | destination _regardless_ of whether your network allows
             | them to go there. This means you have to change your
             | playstyle to fit what passengers want to do, since
             | otherwise, people won 't take trips.
             | 
             | I believe Simutrans handles this better. If you're someone
             | who wants to go to Europe but the only plane ticket you can
             | buy is to South America, you won't take that trip
             | (Simutrans model). But in OpenTTD, passenger demand is
             | basically "yeah I just want to go somewhere" and then you
             | deliver them to Antarctica. Cargodist means that if you now
             | offer service to Greenland, they'll evenly distribute
             | themselves between Antarctica and Greenland.
             | 
             | I'm more of a product-minded person so I prefer Simutrans.
             | Demand is the constant I want to optimize around; I don't
             | want demand to be optimized around my transport network.
             | But this also creates a much more difficult game.
        
         | paxys wrote:
         | So then...OpenTTD is the best railroad simulator?
        
       | nathan_compton wrote:
       | Picolisp - what a weird thing. I have to admire the temerity of a
       | guy who in 2023 is still team "dynamic scope is better."
        
         | actionfromafar wrote:
         | It's like monkey patching in Ruby. It can be used for good and
         | for evil.
        
           | DemocracyFTW2 wrote:
           | In a less balanced both-sides view Ruby as a social construct
           | is an outlier, monkey patching being (rightly so IMHO)
           | regarded as a more-than-questionable practice in most other
           | mainstream PL communities. I mean, yeah, GOTO can be used for
           | good and for evil, and so can GOSUB 200.
        
         | nerdponx wrote:
         | Wait, is it global by default (Lua, Bash) or truly _dynamic_?
         | The latter would be kind of mind-bending to program with as the
         | sole or default style. Was that ever a thing? Maybe I 'm just
         | too young to have experienced that.
        
           | markasoftware wrote:
           | Emacs Lisp had dynamic binding as the default (without any
           | true support for lexical binding) until 2012.
        
             | tmalsburg2 wrote:
             | People talk as if dynamic scoping was objectively a
             | mistake, but the fact that it works well and is really
             | useful in a complex piece of software like Emacs seems to
             | suggest otherwise.
        
               | p_l wrote:
               | original opposition to lexical binding in Lisp circles
               | was that lexical would be slower. That turned out to be
               | false.
               | 
               | Emacs Lisp explicitly kept to dynamic binding for
               | everything because it made for simpler overriding of
               | functions deep in, but resulted in lower performance and
               | various other issues, and ultimately most benefit from
               | such shadowing seems to be focus of defadvice and the
               | like.
        
               | DemocracyFTW2 wrote:
               | A rather weak argument when you consider what kind of
               | mechanisms (like a digital clock with working seven-
               | segment display) people have been programming / put
               | together in Conway's Game of Life; to me this does not
               | suggest in any way or manner that GoL could ever be my
               | favored platform to simulate a digital clock (or anything
               | more complex than a glider for that matter). Likewise
               | vacuum cleaners and toothbrushes have likely been made
               | hosts for playing doom, and people accomplish all kinds
               | of stuff like quines and working software in brainf*ck.
               | None of these feats are indicative of the respective
               | platform being suitable or the right tool for a sizable
               | number of programmers.
        
           | actionfromafar wrote:
           | I used to program in PicoLisp a long time ago but I have
           | forgotten most of it.
           | 
           | Hope you can make sense of this:
           | 
           | https://picolisp.com/wiki/?firstclassenvironments
        
             | nathan_compton wrote:
             | >PicoLisp uses dynamic binding for symbolic variables. This
             | means that the value of a >symbol is determined by the
             | current runtime context, not by the lexical context in the
             | source file.
             | 
             | >This has advantages in practical programming. It allows
             | you to write independent code >fragments as data which can
             | be passed to other parts of the program to be later
             | executed >as code in that context.
             | 
             | This amuses me because while its technically _true_ this
             | amazing feat is accomplished only by denuding of the code
             | of substantial expressive power - namely the relation
             | between the lexical denotation of the code and its meaning.
             | I will say this - aesthetically, I prefer picolisp 's
             | approach to Common Lisp's, which is to just paper over this
             | problem with gensyms, packages, etc. Give me hygienic
             | macros or give me death.
        
           | bsder wrote:
           | It's a shame that John N. Shutt is no longer with us.
           | 
           | He created a very Scheme-like language called Kernel that
           | seemed to walk the line between lexical and dynamic in a much
           | more controlled way.
           | 
           | https://web.cs.wpi.edu/~jshutt/kernel.html
        
         | cess11 wrote:
         | Of all the quirks and weirdness in Picolisp, this is what gets
         | to you?
         | 
         | Either a Picolisp system is shortlived enough that your
         | execution environment actually maps to the file your loading,
         | or you're going to be interactively inspecting it anyway.
        
       | ngcc_hk wrote:
       | Doing one using lua and love2d and hence found some difference or
       | things to ponder
       | 
       | - use ds and discrete event simulation instead of the usual dt
       | (and continuous ...)? Why? Seems all game engine offer dt ...
       | 
       | - shall the track be one way and if two way traffic has to use 2
       | tracks? Otherwise if >1 train or train-group ... crash ? And if
       | there are junction ... route and timing would be issues otherwise
       | crash ?
       | 
       | - picolisp vs fennel ?
        
         | cess11 wrote:
         | "- picolisp vs fennel ?"
         | 
         | Not really comparable. Picolisp is really small, really simple,
         | and that makes it kind of weird. It has fexprs rather than
         | sexprs, there are no seatbelts (as in you will segfault when
         | reaching out of bounds), the numbers are fixnums, the database
         | is object oriented and you query it with logic programming, and
         | so on.
         | 
         | As far as I know, no one has used it for 2D game scripting. If
         | you want to be the first you probably can be, but it will be
         | quite an adventure compared to Fennel.
        
       | W-Stool wrote:
       | No one interested in railroad simulations running Run8 here?
        
       ___________________________________________________________________
       (page generated 2024-06-23 23:00 UTC)