|
ulmont posted:i just finished an article that disagrees with you: I mean a) he does mention both and maybe b) link the article? Because right now this is just some rando's opinion.
|
# ? Dec 21, 2017 19:39 |
|
|
# ? Jun 13, 2024 04:22 |
|
feedmegin posted:I mean a) he does mention both and maybe b) link the article? Because right now this is just some rando's opinion. the joke was that he quoted my own article against me. it does reduce sizes, but only by 5%. it's not the core goal but it does help. from https://github.com/binast/binjs-ref#benchmarks Size (gzipped): 2541kb => 2403kb (-5%) Total parsing time: -72% without skipping, -94% skipping all functions
|
# ? Dec 21, 2017 19:45 |
|
feedmegin posted:right now this is just some rando's opinion. lol no
|
# ? Dec 21, 2017 19:45 |
|
Gazpacho posted:there are no lies in C except the ones you tell yourself ‘this code will run on a computer with a von Neumann architecture’
|
# ? Dec 21, 2017 22:01 |
|
Brain Candy posted:‘this code will run on a computer with a von Neumann architecture’ when I was a babby computer toucher forums poster closeenough told me any project that had already decided on harvard/von Neumann was a waste of time
|
# ? Dec 21, 2017 22:18 |
|
Gazpacho posted:there are no lies in C except the ones you tell yourself
|
# ? Dec 21, 2017 22:43 |
|
perhaps... that is the biggest lie of them all
|
# ? Dec 21, 2017 22:58 |
|
show us on the doll where the compiler touched you
|
# ? Dec 21, 2017 23:39 |
|
Suspicious Dish posted:The theory is that the "binary AST" API comes in the form of <script type=application/javascript+binaryast>, not a JS API. The C++ code in the browser is what parses it. right, that’s the theory, and likewise in theory WebAssembly should run as fast as c++ code running in the browser so why not just use WebAssembly to do this thing? .. not to mention what using WebAssembly to define your own file format and decompression scheme (per file even) might gain you over using the same file format for every website in the world
|
# ? Dec 22, 2017 01:54 |
|
i don't know what he's on about either. binary js addresses a completely different problem from wasm. binary js optimizes some of the network and initialization costs of js. wasm allows other languages to target web clients without being constrained by the common denominator of what's expressible in javascript, and it theoretically permits better peak performance
|
# ? Dec 22, 2017 02:48 |
|
Max Facetime posted:right, that’s the theory, and likewise in theory WebAssembly should run as fast as c++ code running in the browser So, what would your wasm code do? Convert the binary AST back into a JS string and eval that? But then you'd still evoke the cost of parsing
|
# ? Dec 22, 2017 04:07 |
|
PL thread: WASM *airhorn* faaaaaaart
|
# ? Dec 22, 2017 04:23 |
|
prisoner of waffles posted:PL thread: WASM *airhorn* faaaaaaart here we come a WASMing
|
# ? Dec 22, 2017 06:22 |
|
Gazpacho posted:show us on the doll where the compiler touched you *dereferences dilznick*
|
# ? Dec 22, 2017 07:15 |
|
it secretly stands for white american straight men, and I want nothing to do with it
|
# ? Dec 22, 2017 09:41 |
|
Also all coding for browsers is inherently garbage to be avoided in the first place.
|
# ? Dec 22, 2017 10:47 |
|
Gazpacho posted:show us on the doll where the compiler touched you ... gently caress, I can't make this into a bit, but anyway memory writes are a lie int overflow is a lie etc etc What C gives you is a simple syntax (don't confuse this with simple semantics, or, god-forbid, simple to use language) to use for coding against a virtual machine that doesn't really exist and is, in fact, an attempt to codify the least common denominator of different CPU architectures. Treating it as a language that actually represents the underlying machine is laughable and a good way to get burned.
|
# ? Dec 22, 2017 11:02 |
|
Xarn posted:What C gives you is a simple syntax (don't confuse this with simple semantics, or, god-forbid, simple to use language) to use for coding against a virtual machine that doesn't really exist and is, in fact, an attempt to codify the least common denominator of different CPU architectures. Treating it as a language that actually represents the underlying machine is laughable and a good way to get burned. Different CPU architectures as were common circa 1975, even
|
# ? Dec 22, 2017 12:15 |
|
i started learning c because i want to try making some algorithm stuff for work
|
# ? Dec 22, 2017 12:50 |
|
creatine posted:i started learning c because i want to try making some algorithm stuff for work what kind of algorithm?
|
# ? Dec 22, 2017 17:28 |
|
Xarn posted:...
|
# ? Dec 22, 2017 18:44 |
|
Shinku ABOOKEN posted:what kind of algorithm? it's called SPADE basically we do flow Cytometry on cells that have 15-30 cellular markers that are read for fluorescence. what spade does is compares one cell to another based on density and L1/manhattan/cityblock distance. it then builds a minimum spanning tree to show different phenotype and rare populations there's already a program written in matlab/c that I use but I like making my own things as a way to learn a language so I figured why not do this
|
# ? Dec 22, 2017 19:04 |
|
creatine posted:I like ... to learn a language so I figure out why not to do this How I read the above because I'm too lazy for comprehension today.
|
# ? Dec 22, 2017 19:08 |
|
Suspicious Dish posted:So, what would your wasm code do? Convert the binary AST back into a JS string and eval that? But then you'd still evoke the cost of parsing it would fill a buffer with commands. it would then do a one-way context-switch to a small piece of “bootloader” js. this js would have been parsed normally earlier and should be short enough so that parsing it doesn’t negate the performance gains sought in this exercise the piece of js would go over the commands in the buffer, calling a new api endpoint in a tight loop. this sequence of calls would mimic a direct memory transfer into process memory as closely as such a thing can be standardized across different browsers the new api endpoint would in turn construct the desired ast piece by piece, in-place in memory, progressing linearly. it would be subject to all the usual js security considerations involving arbitrary sequences of api calls. most importantly it would not allow expressing invalid in-memory structures
|
# ? Dec 22, 2017 20:41 |
|
so, gzip compiled to WASM?
|
# ? Dec 22, 2017 21:06 |
|
Max Facetime posted:it would fill a buffer with commands. it would then do a one-way context-switch to a small piece of “bootloader” js. this js would have been parsed normally earlier and should be short enough so that parsing it doesn’t negate the performance gains sought in this exercise y tho
|
# ? Dec 22, 2017 22:10 |
|
creatine posted:it's called SPADE nice! godspeed!
|
# ? Dec 22, 2017 22:47 |
|
Shinku ABOOKEN posted:nice! godspeed! thanks! i like programming tbh because i just like solving puzzles to begin with like for this spade thing, i know exactly the steps i have to do and in what order, now its just putting the code pieces together to achieve that
|
# ? Dec 22, 2017 23:07 |
|
creatine posted:thanks! There are easier languages to use than C but if you're enjoying it and its working out then have fun!
|
# ? Dec 22, 2017 23:19 |
|
Suspicious Dish posted:so, gzip compiled to WASM? yea but Win7z apparently JavaScript is a bad PL for expressing programming semantics when you are Facebook and have too much JavaScript this becomes a big problem
|
# ? Dec 23, 2017 00:56 |
|
know what would be really cool? a non-AST semantic encoding of webassemby! each behavior could be encoded into a sequence of bits, with other portions of the bit sequence doing things like allocating and freeing variables, specifying where inputs to behaviors come from, and moving values. then you could just interpret that sequence directly without a transformation step, or implement more efficient transportation steps because you don’t have to also implement JavaScript parsing to figure out the behaviors and their inputs and variables and stuff.
|
# ? Dec 23, 2017 02:14 |
|
creatine posted:it's called SPADE write this in Common Lisp and then optimize it by adding in type declarations
|
# ? Dec 23, 2017 02:16 |
|
eschaton posted:know what would be really cool? a non-AST semantic encoding of webassemby! each behavior could be encoded into a sequence of bits, with other portions of the bit sequence doing things like allocating and freeing variables, specifying where inputs to behaviors come from, and moving values. i have no idea what you're trying to say here
|
# ? Dec 23, 2017 05:39 |
|
Suspicious Dish posted:i have no idea what you're trying to say here
|
# ? Dec 23, 2017 06:08 |
|
Aramoro posted:There are easier languages to use than C but if you're enjoying it and its working out then have fun! this is what everyone says then 10 years later the lab is still using your monstrosity you created while "learning"
|
# ? Dec 23, 2017 06:22 |
|
Max Facetime posted:apparently JavaScript is a bad PL for expressing programming semantics If that's the problem, why is this bizarro AST-building exercise the solution?
|
# ? Dec 23, 2017 06:37 |
|
mystes posted:Probably "why doesn't webassembly have a bytecode" so I'm guessing his information is slightly out of date. sorry, I don’t pay all that much attention to what new ways web “developers” are coming up with to gently caress users but looking at the “binary encoding” description it looks like a reasonable transliteration of WebAssembly to a linkable bytecode format so one can write a VM to directly execute it now they need to entirely divorce it from all of JavaScript and HTML
|
# ? Dec 23, 2017 06:48 |
|
eschaton posted:sorry, I don’t pay all that much attention to what new ways web “developers” are coming up with to gently caress users and then throw it away completely and just use the jvm or .net clr like grownups
|
# ? Dec 23, 2017 09:44 |
|
|
# ? Dec 23, 2017 10:08 |
|
|
# ? Jun 13, 2024 04:22 |
|
if you want a non-js-based bytecode, why arent you just shipping java applets
|
# ? Dec 23, 2017 10:38 |