proglangbase
proglangbase
  • 13
  • 2 827
proglangcast ep 12 (2024.07.23): Bye Bye Again BEAM & Scheme
Bye Bye Hello World refactored again in Erlang, Elixir, and Scheme.
programming languages:
Elixir elixir-lang.org/
Erlang www.erlang.org/
F# fsharp.org/
Gambit Scheme gambitscheme.org/
GNU CLISP www.gnu.org/software/clisp/
original BBHW videos:
Elixir ua-cam.com/video/2zA2W9kZSk8/v-deo.html
Erlang ua-cam.com/video/xXVBsBeUG7U/v-deo.html
F# ua-cam.com/video/NwSW5nNpa3I/v-deo.html
Scheme ua-cam.com/video/a6Ci-K_0II0/v-deo.html
00:00 hello
00:45 Erlang before
01:44 streamlined
02:32 chomp
03:31 more patterns
04:09 less doom
04:42 catch unknown
05:15 run away
05:59 futuring
07:11 lamba loop
08:11 no def in def
09:29 vs F#
11:41 FP or FP
12:18 rebinding
13:02 modules
13:31 escript
14:23 let not let
15:03 byte the code
15:40 interpret?
16:53 scripting
17:32 bashless
18:25 escript it
20:04 BQN FTW
20:17 Erlang isn't F#
20:55 if
22:49 unless
23:35 BEAM strings
25:42 verbose
27:08 no end in sight
28:08 immutable
29:09 Scheme
30:27 set!
31:38 who says functional?
32:44 goals
34:08 mutation encapsulation
35:26 bye bye mutation
35:34 let
36:46 rec
39:11 fold
39:30 is a SRFI
39:50 large
40:32 let*
42:21 count is const
44:16 recursors anonymous
44:47 subdivisions
45:29 one-liners
46:00 code as comments
46:59 most functional
47:33 idiomatic?
48:39 who says?
49:26 Common Lisp
51:38 one global
52:15 Scheme again
53:21 unenforceable
54:53 subdivide first
55:30 damage
56:55 why refactor?
58:52 debt is good?
59:41 bye bye
Переглядів: 265

Відео

proglangcast ep 11 (2024.06.18): Bye Bye Hello Elixir
Переглядів 137Місяць тому
Bye Bye Hello World in Elixir with comparison to Erlang. Source Code github.com/proglangbase/bbhw/tree/main/code/elixir Elixir: The Documentary ua-cam.com/video/lxYFOM3UJzo/v-deo.htmlsi=6u7sZgbuZ8v7wrXg Caleb Curry - Elixir Programming Introduction - Complete Tutorial! ua-cam.com/video/-lgtb-YSUWE/v-deo.htmlsi=Bmpau2DGa5AiuOSE In this video: 00:24 Introduction 02:38 Mutable Variables 03:49 In t...
proglangcast ep 10 (2024.05.20): Bye Bye Hello Scheme
Переглядів 4803 місяці тому
Bye Bye Hello World in Scheme. Scheme: www.scheme.org/ R7RS: r7rs.org/ SRFI: srfi.schemers.org/ SICP: mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book.html Lambda Papers: research.scheme.org/lambda-papers/ The Scheme PL: www.scheme.com/tspl4/ SchemeCrossReference: practical-scheme.net/wiliki/schemexref.cgi Planet Scheme: planet.scheme.org/ paren-...
proglangcast ep 9 (2024.04.21): Bob Therriault, J Enthusiast
Переглядів 1224 місяці тому
An interview with Bob Therriault, J Enthusiast, prime motivator of the J Wiki, creator of many UA-cam guides for J, and founding manager of The Array Cast as well as its panelist representing J. Bob's UA-cam channel: www.youtube.com/@bobtherriault J Wiki code.jsoftware.com/wiki/Main_Page The Array Cast www.arraycast.com/ 00:00 titles 00:10 hello 00:25 into J 02:37 university 03:19 cabin in the ...
proglangcast ep 8 (2024.04.14): Bye Bye Hello Erlang
Переглядів 2094 місяці тому
Bye Bye Hello World in Erlang, with discussions about declarative functional programming with immutability. Erlang/OTP www.erlang.org/ Learn You Some Erlang for Great Good learnyousomeerlang.com/ UA-cam Erlang content: Bjarne Däcker - How Erlang got its name | Code BEAM STO 19 ua-cam.com/video/0ytatCDEGyc/v-deo.html Derek Banas - Erlang Tutorial ua-cam.com/video/IEhwc2q1zG4/v-deo.html in this v...
proglangcast ep 7 (2024.04.02): Bye Bye Hello J
Переглядів 2855 місяців тому
Bye Bye Hello World in J. Jsoftware www.jsoftware.com/#/ J Wiki code.jsoftware.com/wiki/Main_Page J Playground jsoftware.github.io/j-playground/bin/html2/# Github jsoftware github.com/jsoftware The Array Cast www.arraycast.com/ episode dedicated to Roger Hui: www.arraycast.com/episodes/episode13-roger-hui episodes with Henry Rich: www.arraycast.com/episodes/episode73-j95 www.arraycast.com/episo...
proglangcast ep 6 (2024.03.17): Bye Bye Hello F#
Переглядів 1115 місяців тому
Bye Bye Hello World in F# with discussions about language features and functional programming. Be sure to check out Scott Wlashin's website fsharpforfunandprofit.com/ and his video tutorials for F# and Functional Programming: F# for C# Programmers ua-cam.com/video/KPa8Yw_Navk/v-deo.htmlsi=Cd6tySsTpFLT_UM3 Domain Modeling Made Functional ua-cam.com/video/2JB1_e5wZmU/v-deo.htmlsi=dSkQqKjvpR6WcF9u...
proglangcast ep 5 (2024.03.03): Adám Brudzewsky, APLer
Переглядів 2426 місяців тому
An interview with Adám Brudzewsky, an inspiring, iconic, APLer who was raised among the creators of APL, and who is now the lead language designer for Dyalog: the top provider of modern APL technology. Adám Brudzewsky [abrudz] on github: github.com/abrudz Adám's APL: www.youtube.com/@abrudz APLcart: aplcart.info/ APL Wiki: aplwiki.com/ Dyalog: dyalog.com/ TryAPL: tryapl.org/ Adám is a panelist ...
proglangcast ep 4 (2024.02.25): APL to BQN
Переглядів 2426 місяців тому
Our reaction to Adám Brudzewsky´s response to our proglangcast episode 3: Bye Bye Hello World implemented in APL, and then dive fully into our BQN implementation of BBHW . Adám Brudzewsky´s Bye Bye Hello Dyalog APL: ua-cam.com/video/0k_lfwprF2M/v-deo.html The Array Cast ep. 73, Henry Rich and the Release of J9.5: www.arraycast.com/episodes/episode73-j95 The Array Cast ep. 32, Control Structures...
proglangcast ep 3 (2024.02.11): Bye Bye Hello APL
Переглядів 3627 місяців тому
Bye Bye Hello World implemented in APL with a glance at BQN compared to the C implementation. Adám Brudzewsky´s Dyalog solutions: ua-cam.com/video/0k_lfwprF2M/v-deo.html The Array Cast ep. 73, Henry Rich and the Release of J9.5: www.arraycast.com/episodes/episode73-j95 GNU APL www.gnu.org/software/apl/ BQN mlochbaum.github.io/BQN/ APL Wiki aplwiki.com/ The Array Cast www.arraycast.com/ code_rep...
proglangcast ep 2 (2024.02.04): Goodbye Hello PHP
Переглядів 637 місяців тому
Goodbye Hello World in PHP and comparison to the C implementation.
proglangcast ep 1 (2024.01.28): Goodbye Hello World.
Переглядів 1847 місяців тому
We introduce proglangcast along with our project for proglangbase: Goodbye Hello World.

КОМЕНТАРІ

  • @0LoneTech
    @0LoneTech 7 днів тому

    Sounds like Erlang if is like Lisp cond, using a condition for every branch. Haskell does something similar with the constant "otherwise", which is simply True. The main use is as a final catch all guard. Example: collatz n | even n = n ˋdivˋ 2 | otherwise = 3*n+1

  • @0LoneTech
    @0LoneTech 7 днів тому

    There are a few interesting approaches to interpretation. For instance, Forth is an interpreted language with an embedded compiler you're absolutely expected to use, mostly through the : word. Forth doesn't even have a concept of invalid syntax; you just have a different vocabulary after making definitions. And you can freely switch between interpretation and compilation. E.g.: : two [ 1 1 + ] literal ; ( Pauses compilation to calculate 1+1, then takes the result from the stack and puts it in the compiled word two. ) Note that ( isn't syntax. It is a word that consumes input until it finds a ). While defining a word, it's not active in the dictionary, so to recurse you use the control word recurse. Compare rec in ML (and thence O'Caml and F#) or 𝕊 in BQN. GHCI and Hugs make hacks to read Haskell line by line. Because one definition in Haskell often has the shape of independent declarations, you have to add grouping to them for interactive entry. Compare to Python's interpreter requiring a blank line after a block statement. E.g.: :{ countdown :: Int -> [Int] countdown 0 = [] countdown n = n : countdown (n-1) :} If you didn't group them, the interpreter would rebind countdown to only the last definition with no base case, as if each binding was a separate let. Golang is also used in a scripting mode, compiling before execution. Fish is a more regular shell language (somewhat simplified rules for quoting etc). Xonsh is a strange hybrid blending shell and Python. Unix lets you make scripts with things that really don't expect it (easiest with languages that use # for comments). I'm probably digressing again. I'll likely comment again.

  • @SystemAlchemist
    @SystemAlchemist Місяць тому

    Cool discussion! Was enjoyable listening to it.

  • @0LoneTech
    @0LoneTech 2 місяці тому

    The primary reason pattern matching is better than IsSome is that you get a scope where the value inside really exists. It prevents accidental access to None.Value (which raises NullReferenceException). We see the same pattern with TryParse, where i only exists if it is valid.

  • @justinhale5693
    @justinhale5693 2 місяці тому

    I thought of an analogy for symbols for a programming language in Chinese: the literacy rates are similar but correct writing ability is lower, on the other hand, it allows people who speak different languages to communicate in writing for little additional complexity.

    • @proglangbase
      @proglangbase 2 місяці тому

      Adám Brudzewsky also mentioned the written Chinese language in his interview.

  • @justinhale5693
    @justinhale5693 2 місяці тому

    Maybe if you start the translation, the appropriate title will become evident.

    • @proglangbase
      @proglangbase 2 місяці тому

      What are you referring to?

    • @justinhale5693
      @justinhale5693 2 місяці тому

      @@proglangbase Translating "array programming" into Portuguese, if I remember correctly.

    • @proglangbase
      @proglangbase Місяць тому

      @@justinhale5693 Oh right, but I already used Google Translate on it which for "Array Programming" gives "Programação de matriz" which is not accurate. We need the Portuguese-speaking programming community to vote on this. The English term "Array Programming" was most likely invented by programmers.

  • @0LoneTech
    @0LoneTech 2 місяці тому

    C does not predate concurrency; it was written to port Unix, and Unix itself is a pun on Multics, another time-sharing operating system. It's more a matter of layering; C allowed the operating system to be largely abstracted from the details of the particular computer, and the operating system in turn implemented concurrency for users and processes, via tools like pipe, fork, wait, select and alarm. They were codeveloped. Later the standard library abstracted from the particular operating system.

    • @proglangbase
      @proglangbase 2 місяці тому

      To my knowledge, official definitions of the C standard predates when any programming languages included concurrency as part of their language or standard library definition. They mostly always left it to third-party libraries that interface the implementation operating systems. That was my entire point about <threads.h>; to this day it remains even an optional part of the standard.

    • @0LoneTech
      @0LoneTech 2 місяці тому

      @@proglangbase Origins of language level task support is an interesting question. While multiuser Forth did multiprocessing, it was mostly to share the computer among users, not something a single task would use. C wasn't standardized until 1989, specifically excluding threads (system() would suspend your program), which would place Occam (1983) as a contender. Unix's design didn't require threads for either multiprocessing or concurrency, so C may not be the place to expect it. Nevertheless, OpenMP added it on top of C, with compiler support.

    • @0LoneTech
      @0LoneTech 2 місяці тому

      I found task support in Ada 83. That doesn't push the timeline back much but absolutely is a standard (Mil Std 1815) with language level support. The rationale documents also have a great many interesting references.

    • @proglangbase
      @proglangbase 2 місяці тому

      @@0LoneTech Nice catch. I was thinking about Ada when I wrote that actually because I started working on an Ada compiler when I was very young and remember it having something like that.

  • @0LoneTech
    @0LoneTech 2 місяці тому

    Multithreading fundamentally isn't platform independent; it restricts your platforms to ones where threading exists, and it's platform dependent how they function as well. E.g. most GPUs implement lock-step SIMD threads, preferring to have small cores in thousands of instances, while an XMOS XS1 processor requires a minimum of 4 threads to run at full instruction rate, but cannot host more than 8. Few languages implement a model of their own for it, e.g. multiuser Forth. Most thinly wrap system level APIs. That said, OpenMP is widely supported in C compilers and provides language level multiprocessing. Concurrency is yet another topic (see e.g. AIO, nonblocking IO, select and poll). The core strength of C always was the ability to port programs to different machines. Shoving in too much platform specific stuff into the language is counter to this.

    • @proglangbase
      @proglangbase 2 місяці тому

      Green threads can always be implemented regardless of platform since they context switch entirely in software within a single operating system process. Erlang/OTP demonstrates this pretty effectively. But I do agree with your final point that the wide applicability of C is due to its minimalism and being a low level of abstraction just above assembly language.

  • @reasonablecow
    @reasonablecow 2 місяці тому

    I didn't hear the joke about what would be idiomatic in PHP at 40:22, the captions didn't help 😅

    • @proglangbase
      @proglangbase 2 місяці тому

      Yeah, rewatching it I don't remember what Steve said either. He might have edited it out. I'll ask him about it.

  • @bombastik87
    @bombastik87 2 місяці тому

    In maths it's called "nabla" (read as if it was italian or spanish) It stands for differential gradient operator

  • @0LoneTech
    @0LoneTech 3 місяці тому

    19:05 This is an important life lesson. Interest is a driving force, which can transform work from drudgery to fun. The distinguishing mark of a great teacher isn't field knowledge, it's nursing that interest.

  • @0LoneTech
    @0LoneTech 3 місяці тому

    1:04:02 This resembles the Python idiom of "if __name__=='__main__'", but it's additionally required because J has an active IO stream like a Commodore computer; and it's in use for reading the program, like it might be in Forth. It's like using a shell here-document by accident.

  • @0LoneTech
    @0LoneTech 3 місяці тому

    34:58 While APL, BQN and J all picked different names for their operands, there's logic to each: APL: Alpha is the first letter, and omega the last. BQN: Functions are often f(x), so x is the monadic argument. w is the letter left of x in the alphabet. J: Same ordering, but x is the optional left operand. A second function is often g(y). Running out of letters is a bit messy. For instance, in GLSL 4-vectors are xyzw, where w is out of order. Even more confusingly those might hold quaternions with the unit order 1ijk.

    • @proglangbase
      @proglangbase 3 місяці тому

      Agreed; each language is thoughtful in this choice, so it wasn't really a criticism but rather how each language and it creators leaned toward different metaphors.

  • @0LoneTech
    @0LoneTech 3 місяці тому

    I'd be delighted to have a chat about Haskell, though the first thing to note is the bye bye hello world program is far from idiomatic. I'll send a GNU Forth version shortly; it matches Scheme nicely with the minimal syntax, but has a totally different view on parenthesis and types.

    • @proglangbase
      @proglangbase 3 місяці тому

      BBHW is an alternative to Hello World, and so like it, is procedural and effectful by its very nature. It fails to address the core idioms of array, concurrency, functional, and logic paradigms. We have expressed the disappointment of this in our videos, and so are thinking of what to do about that.

    • @0LoneTech
      @0LoneTech 3 місяці тому

      @@proglangbase Of course not every benchmark can target every feature of every language. It's just that I deliberately chose to do some things in a manner not primarily associated with Haskell, such as omitting all type information (otherwise types first is often recommended). The delay functionality actually required Control.Concurrent. Similarly, Forth had no standard way to access command line arguments; it often runs without any (other) operating system.

  • @michaelnardell991
    @michaelnardell991 4 місяці тому

    Bob’s stories resonate with me. The winding paths to J. As a newly minted manager, I understand the pull of programming languages that change the way you think.

  • @WilhelmDrake
    @WilhelmDrake 4 місяці тому

    Listening to this really highlights the importance of education. We desperately need universal higher education in Canada. Education is too important. They always say we can't afford it and they are ALWAYS lying.

  • @WilhelmDrake
    @WilhelmDrake 4 місяці тому

    Great stuff! I'm excited to come along for the ride as you embark on your journey into the exiting realm of programming languages. Thank-you!

  • @MartinClausen
    @MartinClausen 4 місяці тому

    F# for Fun and Profit is an excellent resource. Have you considered inviting and expert in the language that you are trying out on to provide constructive critique of your solutions? I think that could be both entertaining and educational.

  • @MartinClausen
    @MartinClausen 4 місяці тому

    Love this podcast and the whole series. Please keep an eye out for small font size. In long stretches of this there is relevant code on the screen that is unreadable even in full screen and max resolution.

    • @proglangbase
      @proglangbase 3 місяці тому

      Agreed; we have been improving bit by bit as we go.

    • @MartinClausen
      @MartinClausen 3 місяці тому

      @@proglangbase I noticed, much appreciated.

  • @andrewrzeznik7922
    @andrewrzeznik7922 4 місяці тому

    I disagree with the focus on things in stdlib here. The stdlib model makes sense for older languages before packaging, but package managers have changed what's considered effectively part of the "base" language. Also, as another note, basing this example on what C can do at a starting point while not allowing external libraries is extremely limiting from a real code base. As a major example, the lack of a hash map limits you heavily. I think you should likely reconsider this spec to allow some base external libraries to then let the C version use a hashmap.

    • @c4tubo
      @c4tubo 4 місяці тому

      Point taken, but for my part I do not agree. A language's standard library is called "standard" for that very reason: every implementation that conforms to its specification must provide was it declares as standard. No such guarantee is made for additional externally packaged and imported libraries. Add to that, the competition between different packages for the same functionality makes it untenable to decide which is most representative. Although we must pick a particular implementation for each language that we write BBHW for, our focus will remain on each programming language in general as the number of different implementations is much greater than the standards, as is the case with Scheme, for example. Notice that for the later APL episodes we have included alternative implementations for Dyalog APL, provided by Adám Brudzewsky, and there are significant differences between the Dyalog and GNU APL code.

    • @andrewrzeznik7922
      @andrewrzeznik7922 4 місяці тому

      ​@@c4tubo Fair point and makes sense here. These are great videos btw, thanks for putting them up!

  • @code_report
    @code_report 5 місяців тому

    Really like the cleaned up screen split : ) less noisy and easier to focus on the code

    • @proglangbase
      @proglangbase 3 місяці тому

      We are improving incrementally, but still have a long way to go to catch up to your level of quality ;-)

  • @abrudz
    @abrudz 6 місяців тому

    00:01:45 Sure 😀

    • @c4tubo
      @c4tubo 6 місяців тому

      😄Great! I will DM you on Discord.

  • @0LoneTech
    @0LoneTech 6 місяців тому

    I have now confirmed that UA-cam shadowbans comments containing BQN or APL on a video regarding BQN and APL, there's no option for the video creator or commenter to do anything about it, and UA-cam simply lie about having a review process. This isn't fixable. All switching the moderation settings did was change from silent deletion to "shadow" deletion. Both are automated and uncorrectable by UA-cam's design. Let me emphasize that. UA-cam is by design making its heuristics, including ML based ones, uncorrectable. They *prefer broken over managable*.

    • @c4tubo
      @c4tubo 6 місяців тому

      But I do see this comment posted and you have included the words BQN and APL in it.

    • @0LoneTech
      @0LoneTech 6 місяців тому

      @@c4tubo It's not the words, it's at best guess the code.

    • @proglangbase
      @proglangbase 6 місяців тому

      @@0LoneTech Then YT must not like APL/BQN symbol glyphs.

  • @0LoneTech
    @0LoneTech 6 місяців тому

    A few BQN notes: •term.Flush and •term.OutRaw to avoid those undesired newlines •ParseFloat to parse the number ⊑×´{𝕩∊"0123456789"}¨ could be ∧´∊⟜"0123456789" UA-cam silently deleted the first comment containing these. And shadowbanned this one, congratulations if anyone other than me ever gets to see it.

  • @douglasmennella4525
    @douglasmennella4525 7 місяців тому

    I liked this explanation of the value of symbols from the documentation for the goal array language. “In most programming languages, operators work on scalar immutable values (also called atoms), like numbers and sometimes strings too, but containers are handled using loops, higher order functions or explicit recursion. This means that such languages do not need many operators: there aren’t that many interesting basic operations when working with scalars.”

  • @code_report
    @code_report 7 місяців тому

    Nice video. Would be interested to see this in Dyalog APL. Looking forward to @abrudz's response video : )

    • @c4tubo
      @c4tubo 7 місяців тому

      Me too 😃

    • @DyalogLtd
      @DyalogLtd 7 місяців тому

      ua-cam.com/video/0k_lfwprF2M/v-deo.html

    • @abrudz
      @abrudz 7 місяців тому

      @@c4tubo It has been published, but UA-cam removes comments that link to it ;-(

    • @c4tubo
      @c4tubo 7 місяців тому

      @@abrudz The video had the default comment moderation "Basic" which must have blocked it. I have disabled comment moderation and added a link to your solutions in this description of this video above. Thanks for your work here.

    • @0LoneTech
      @0LoneTech 6 місяців тому

      ​​@@c4tubo Regardless of settings, youtube likes to destroy conversation. I posted a comment regarding the remaining questions in BQN and it got silently deleted.