Fork me on GitHub
#off-topic
<
2018-04-26
>
qqq04:04:05

Is the WebGPU api documented anywhere? I have found a few demos, but I don't see what new features it enables and I can't find a list of WebGPU functions that WebGL doesn't provide.

rnagpal16:04:34

I am new to clojure and clojurescript, and I really like it because of repl. Though tests provide feedback, but repl is much more interactive and fastens the development I never used repl in scala applications(normal sbt app), or in typescript(in react or angular apps) Did anyone use repl in scala or typescript apps ?

spinningtopsofdoom16:04:38

From my experience at work most people use types and the typechecker for feedback rather then a repl.

rnagpal16:04:59

yeah types and type checks just checks the type, we can argue that we can use Typescript playground or scala console as they are repls too, but they dont have the seamless integration: like going into a namespace and executing functions

borkdude16:04:16

Type system is partially like a REPL: in a REPL we detect type errors at runtime and fix them. Usually those languages like Haskell and Scala also offer some limited interactive (if it’s a real REPL is a discussion I don’t want to get into) where you can do like 50% of the cases you can do in Clojure.

rnagpal16:04:37

Is that a language feature, or its just the clojure community invested more into repl that others ?

borkdude16:04:52

language feature as in var indirection which makes hot reloading seamless

borkdude16:04:25

Imagine: run web request, inline def some values, inspect them, redefine function, repeat

borkdude16:04:02

this is what I’m doing on a day to day basis. in Haskell you have to restart your web server (I think, I’m not that experienced with it)

borkdude16:04:25

in Scala you do have some hot reloading stuff built into Play I think

borkdude16:04:39

in Java you can use jrebel, but it’s not native to the language

borkdude16:04:31

on the other hand, in typed languages like Haskell you do not have to restart that often if you rely on the type system and small snippets you test in ghci

rnagpal16:04:20

yeah, with scala, I will have to restart my server to reflect the code change. Same is in typescript, I have to transpile again so with scala/typescript for coding (pure functions) steps for me are 1) Apply breakpoint, see what is happening 2) Do change 3) Reload (transpile or restart server) 4) refresh the request 5) inspect again or better write tests which is faster than above but still not as interactive as repl Where as in clojure/clojurescript 1) Run app and connect repl 2) switch to ns. Keep writing and testing pure functions until they work

borkdude16:04:33

right… there are situations where I wish the app was written in a typed language, like when I have to refactor 32 namespaces, but then again, those 32 namespaces were probably written a lot faster in Clojure in the first place, so we already had a head start

rnagpal16:04:06

yeah refactoring big apps are pain in non typed languages.

rnagpal16:04:00

But I will have less fun now working on a Typescript and scala apps as I will miss the happy world of clojure repl

wink16:04:16

pff, typed or untyped, static or dynamic, grep ftw 😛

borkdude16:04:27

yeah grep is nice until you have to grep for four different ways keywords are used

👍 4
rnagpal16:04:35

yeah, didn’t want to go into this discussion, but just wanted to know if someone uses repl for typescript or scala in the same way as clojure

borkdude16:04:25

@rnagpal bottom line: REPLs just aren’t the same in non-Lisps, you don’t get the same level of interactivity

rnagpal16:04:35

May I know what the reason for this statement ? like what exactly does lisp languages provide which enables repls to be so seamless

rnagpal16:04:11

If you can just specify some terms/words, I can read myself in details. No need for a detailed answer

seancorfield16:04:11

I think there's also the historical mindset that Lisp provides an interactive running system "as a whole" and the REPL is the standard way to deal with it. Smalltalk is similar in that you have a live, running system as part of your coding environment (and vice versa). Most languages treat the application as something separate from your development tool chain.

seancorfield16:04:49

For example, when developing applications with Clojure, I start a REPL and then start the application -- and sometimes multiple applications -- from inside the REPL so my code grows "organically" while it's running, directly "inside" in my development environment.

seancorfield16:04:40

I can choose to run a REPL inside any packaged, deployed application too (either programmatically, or at startup via the JVM options to start a Socket REPL).

borkdude16:04:15

Btw, I liked your comment on Haskell on clojureverse @seancorfield. I’ve been learning Haskell from Haskell Book and I quite like it, but I haven’t made any big applications with it yet. I think I’ll miss the REPL big time when I would enter that world professionally.

seancorfield16:04:37

Since the unit of "compilation" is a top-level form, the REPL and the compiler work exactly the same way so you don't trade off anything for using a REPL in Clojure.

borkdude16:04:10

I have used a REPL in production to inspect what was going wrong (and occasionally repaired some data by using a database or Datomic function). Also I’ve used a REPL to debug an uberjar issue. Those are examples of non-dev usages of REPLs.

seancorfield16:04:16

@borkdude Thanks. I really want to love Haskell. I always wanted it to be successful and popular. It was the culmination of everything so many of us had been working on during our academic exploration of FP in various forms.

rnagpal16:04:55

I can see the benefits of var indirection

rnagpal16:04:20

but even for javascript/typescript where everything is declared in global namespace

rnagpal16:04:38

I dont see anyone using repl in the same way as we use for cljs

rnagpal16:04:49

may be its the mindset

seancorfield16:04:52

REPLs in production are the very definition of "with great power comes great responsibility". We run one inside one of our complex, critical, polyglot apps, and have been known to apply patches without downtime (as well as inspecting and fixing data).

rnagpal16:04:09

a lisp programmer want repl as one of the basic things

rnagpal16:04:35

Also, we can do the same thing in by adding a debugger and adding code in debug console and executing it in scala

rnagpal16:04:39

but its not seamless

borkdude16:04:20

You’re not getting very far by doing that

borkdude16:04:57

I’ve experimented with using a Clojure REPL in a Scala program once: https://blog.michielborkent.nl/blog/2016/07/26/clojure-from-scala/

john16:04:12

@rnagpal also, everything is first class, in a lisp "environment"

john16:04:31

so it's easy to compose things together

rnagpal16:04:54

@john we can say the same in Javascript also, that everything is first class. So what is the root cause repl works seamless in cljs and not in typescript, both are transpiled to JS

john16:04:24

Javascript ain't that bad of a repl language

john16:04:51

Perhaps the homoiconicity also contributes to that first classedness

john16:04:55

of tokens

john16:04:01

for lisp

scriptor18:04:26

repling into qa can be amazing at times

scriptor18:04:49

even if it's just to log out some stuff to see what's actually getting passed around

dominicm18:04:29

When writing a health-check endpoint, is it conventional to obfuscate the path?

dominicm18:04:44

Particularly given that the endpoint is public.

wink18:04:13

nginx doesn't do it by default, that's a data point of 1 🙂

wink18:04:42

I'm also more on the side of "firewall it off" and not obfuscate. /status is fine

dominicm18:04:56

I'm not sure I can with Route 53's health checking service.

scriptor20:04:18

any reason to obfuscate it?

dominicm20:04:17

@scriptor I wasn't sure if it was generally acceptable to have a "weird" page like that so easily found

phronmophobic20:04:15

seems like you use firewall rules to make health checks that aren’t public

👍 4
dominicm06:04:42

Thanks for finding this, my googling was poor!

qqq22:04:29

(commercial okay) What are really mature Forths ? So far, I see gforth and swiftforth