Submit

Back to the channels

#primate

  1. * phaleth joined #primate
  2. * skillnews quit (Remote host closed the connection)
  3. * skillbot quit (Remote host closed the connection)
  4. * skillbot joined #primate
  5. * skillnews joined #primate
  6. * jreicher quit (Read error: Connection reset by peer)
  7. * phaleth quit (Ping timeout: 248 seconds)
  8. * phaleth joined #primate
  9. * phaleth quit (Remote host closed the connection)
  10. * phaleth joined #primate
  11. phaleth yet another TS runtime https://github.com/are-we-dodo-yet/dodo
  12. * phaleth_ joined #primate
  13. * phaleth quit (Remote host closed the connection)
  14. * phaleth_ is now known as phaleth
  15. * jreicher joined #primate
  16. phaleth https://1clickimpact.com/website-carbon/bytecode.news
  17. jreicher phaleth: "TS" runtime?
  18. jreicher You mean typescript?
  19. phaleth yup
  20. blue ddf
  21. blue deno dumpster fire :P
  22. jreicher I really don't know what to me make of js, ts, and wasm. So many people seem to think they are "competitive" now, and without any firsthand experience I'm left wondering "how is that possible"?
  23. blue ts is js with types. wasm is a different beast, popularised by the web, but not limited to it. consider it an abstraction. many languages can compile *to* it, and the web (as in browsers, and also runtimes), can it
  24. blue you can write a c program, compile it to a .wasm file, then load and run it in a browser, or in node
  25. blue for c, gcc does not directly compile to wasm, so you usually use an additional tool call emscripten, `emcc`. but that's a gcc stupidity; clang has a wasm32 target
  26. blue for go, rust or zig, they have wasm as a target
  27. blue next to wasm, there is also wasi. when people started to run wasm code on runtimes, so on servers, they realised wasm doesn't have apis to interact with the operating system, i.e. IO/FS
  28. blue enter wasi, Web Assembly System Interface, aka POSIX for wasm
  29. jreicher I know what it "is". But I don't know what its place in the world is.
  30. jreicher Or rather I should say I know what they are.
  31. jreicher From what I can tell the only thing that distinguishes them is the historical browser runtime. And that's historical accident, no?
  32. jreicher I don't understand the technical merits, if any.
  33. blue distinguishes what?
  34. blue I just told you what its place in the world is. the typical use can is cpu-intensive stuff running in the browser. you'd write it in another lanugage, then load it in the browser. that's a perf/interoperability gain
  35. blue use case*
  36. jreicher Why js/ts/wasm/wasi should be preferred over more elegant languages and runtimes.
  37. blue that is a chain of dependencies
  38. blue js should be preferred because it's the only language browsers understand natively. they don't understand python or ruby or php
  39. blue ts should be preferred because it's a types-based superset of js
  40. jreicher That is what I've always suspected, but I can't help wondering what would happen if browsers support another runtime. Care to speculate?
  41. blue wasm should be preferred for the first reason as well, combined with you wanting to execute NON-js code in the browser, for whatever reason. the emergent reason is performance, another is people wanting to run any of the languages I mentioned in the browser
  42. phaleth if browsers supported anything better than JS then JS would be slowly but surely abandoned
  43. blue wasi is people trying to bridge the gap between wasm and server runtimes, so you can use wasm usefully on the server as well. what the use case there is, is yet to be revealed. some cloud providers support run wasm functions, that would bea use case
  44. blue browsers will never natively support another runtime, they have no reason to, and if they did, wasm killed off that reason
  45. phaleth the only reason JS is pervasive is cause of alot of people don't want to struggle with two languages on client and server and also cause web browser is way too convenient client
  46. blue browsers have no incentive structure to do, jreicher. js has been optimised in the last 10 years (v8, jsc) to run almost as fast as native code. and wasm now provides a good escape for cases it doesn't
  47. blue to do so*
  48. phaleth there are far better runtimes than the JS ones that can utilize hardware resources in a much better way than JS allows
  49. jreicher What I'm trying to get at is something like this: if a wasm-ish runtime was designed for browsers from scratch now, would it still look like wasm, and if not, what would it look like?
  50. blue there are, but the cost of bringing them to the browser isn't justifiable
  51. jreicher I'm trying to separate history from technical merit.
  52. jreicher Just for my own understanding.
  53. blue it's hard to tell, jreicher. wasm is intentionally a very simple language with I believe like four primitive types. this is a bit like you asking, if x86 webassembly were redesigned today, how would it look like. I don't believe wasm has been specifically designed with js as the host/client language in mind, but I may be mistaken
  54. phaleth wasm's goal is to be streamable and compilable at the same time, but so far a lot of it's uscases are not for the web, neither wasm is assembly, so the web assembly name is not very fitting
  55. phaleth the problem wasm can solve is the so called long cold starts of services
  56. jreicher That's a good point. I should probably make some time to look at wasm while making a conscious effort to forget the branding
  57. blue how jreicher, your question is not without merit. let me ask a question in return. if I want to run react today, and also benefit from things like SSR, but I want the server to be ruby, what are my options?
  58. blue s/how/now/
  59. phaleth wasm modules can be thought of as being scalable down to zero, due to the wasm service can just be started quickly so it can also remain shut down when not needed
  60. phaleth but there is of course orchestration around that is required
  61. blue so if you told me, "just take ruby on rails", I'd tell you, then I lose react SSR
  62. jreicher blue: Yeah the larger ecosystem most definitely makes a difference. That's one of the reasons I'm implementing my language in Java. I don't have an easy answer. I'm just trying to understand the landscape.
  63. blue what I'm trying to hint at it, that wasm is a nice abstraction for creating one application that can still use all the perks of js frameworks like react/svelte/vue, which need both a JS server and a JS client
  64. blue and also have a server running ruby code
  65. jreicher Hint taken. I need to look at wasm again with that context in mind.
  66. blue this is something ruby on rails can't do for ruby, or django for python, or spring for java, or any php framework for php
  67. blue but it is something that primate does (for ruby/python/go; not yet for java/php)
  68. blue jreicher, you should look into people that want to run things like laraval but with react. it's very weird and complicated
  69. blue (they end up needing to run two servers)
  70. blue wasm solves that elegantly
  71. jreicher Interesting. Ta.
  72. phaleth wasm is just an overengieered way to allow faster number crunching in web browsers, remember that all numbers in JS are 64 bit floats
  73. blue This is also why I'm so excited about Java 25; with its native wasm compilation, it could be well supported by primate as backend. I just haven't got to it yet
  74. blue (designing the API is actually harder than wiring it)
  75. phaleth wasm mvp (1.0) is 32 bit, the support for 64 was added to web browsers only recently
  76. blue phaleth forget wasm in the browser, it's not interesting there at all imho :P
  77. blue wasm is most interesting on the server because there I suddenly get access to the entire world of the programming language
  78. phaleth also the problem with JS is the required conversion to UTF-16 that has to be done all the time
  79. blue utf-16 strings?
  80. blue ya
  81. blue I guess the point I'm trying to make is, perhaps interesting wasm/wasi use cases haven't arisen yet. primate is trying to change that
  82. phaleth wasm was never meant to make runtimes multilingual, most of the widely used languages have their own GC and will never be able to cleanly tap into wasm's gc
  83. blue jreicher: https://primate.run/docs/backend
  84. nevet Primate — Backends
  85. phaleth because of that there are new languages being created and the ecosystem is being split further for the sake of hype and overengineering
  86. blue ya well, that always happens
  87. phaleth on the other hand wasm can unify the codebase of a project and solve problems with some of the so called native targets by allowing say kotlin to compile to wasm
  88. blue remember the mushroms-after-the-rain-framework cumbrian explosion after bun released?
  89. phaleth and so a kotlin project can target mobile
  90. phaleth blue: nope
  91. blue things like honojs or elysiajs that are specifically bunonly
  92. blue total dumpster fire abandonware
  93. phaleth also Java has JS runtimes of it's own, no need to worry about wasm
  94. blue honojs supports deno too I believe, but now deno is dead so it's effectively a bunonly framework
  95. phaleth yeah, but hono is at least pushing performance boundaries of express and the likes
  96. phaleth it's all hype perf and shit so people can rewrite for eternity
  97. blue ya we should stop that
  98. blue it's easy to optimise correct stuff, it's hard to correct optimised nonsense
  99. phaleth there are dev teams forming foundations around new software tools and then people calling them douchebags for one reason or another so out of frustration new tools are created and new teams form
  100. blue ya
  101. * nevet joined #primate
  102. * blue!~blue@user/blue changed the topic to: https://primate.run | This channel is logged: https://bytecode.news/logs/irc/libera/primate
  103. * nevet joined #primate
  104. * blue!~blue@user/blue changed the topic to: https://primate.run | This channel is logged: https://bytecode.news/logs/irc/libera/primate
  105. * nevet joined #primate
  106. * blue!~blue@user/blue changed the topic to: https://primate.run | This channel is logged: https://bytecode.news/logs/irc/libera/primate
  107. dreamreal nevet now has actual extension points :D
  108. dreamreal had them, really, but now they're being used
  109. dreamreal (safecracker is now an extension and is no longer in the streampack repository)
  110. * nevet joined #primate
  111. * blue!~blue@user/blue changed the topic to: https://primate.run | This channel is logged: https://bytecode.news/logs/irc/libera/primate
  112. blue great
  113. blue dreamreal: idea for repopack. `rp verify <path-to-bin>`; gets sha256 of an exe, queries repopack, and shows you data about the bin, if published on repopack. date, publisher, status (if revoked)
  114. blue this also is an idea in the direction of the "known-unknown" problem. if repopack always records the sha256 of every artifact it publishes, then this is a forward mechanism by design
  115. blue (regardless of the artifact itself has such a mechanism)
  116. blue regardless if*
  117. dreamreal yeah, makes sense
  118. * skillnews quit (Remote host closed the connection)
  119. * skillbot quit (Remote host closed the connection)
  120. * skillbot joined #primate
  121. * skillnews joined #primate
  122. * phaleth quit (Quit: phaleth)
  123. blue dreamreal: I'd like your input on something
  124. blue so repopack has stacks. stacks are code dependencies. if I stack 256 on 255, then it doesn't rebase onto master, but onto 255. the idea is to have work that builds up on other work, and to avoid too many merge conflicts and rebasing after merging onto master
  125. blue generally, if I have a clean stack 1 -> 2 -> 3 -> 4, and all of them are reviewed and approved, then they will merge cleanly in order
  126. blue the issue I'm facing are *non-linear* stacks
  127. blue consider this:
  128. blue parent
  129. blue - child 1
  130. blue - child 2
  131. blue in this case, both children stack on parent, but they are independent of each other. they can merge in either order, and often merging one will introduce conflicts that need to be resolved in the other
  132. blue they can have children of their own also, and so on
  133. blue so here's the thought:
  134. blue A) are non-linear (shared 'upstream' history) stacks useful at all? what use cases?
  135. blue B) if not, does it make sense to reject stacking more than one child on a parent?
  136. blue C) if yes, does it still make sense to allow an *opt-in* project setting "Only linear stacks"
  137. blue fin
  138. blue (so a 'use case' for non-linear stack is this: parent introduces necessary base work; then two children introduce two *independent* features that base on this work; but it doesn't sound like a very useful use case to me)

Search posts