Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
feedmegin
Jul 30, 2008

ulmont posted:

i just finished an article that disagrees with you:


maybe you could ask the author why they mentioned sizes several times?

I mean a) he does mention both and maybe b) link the article? Because right now this is just some rando's opinion.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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

JawnV6
Jul 4, 2004

So hot ...

feedmegin posted:

right now this is just some rando's opinion.

lol no

Brain Candy
May 18, 2006

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’

JawnV6
Jul 4, 2004

So hot ...

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

Xarn
Jun 26, 2015

Gazpacho posted:

there are no lies in C except the ones you tell yourself

:wrong:

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
perhaps...

that is the biggest lie of them all

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
show us on the doll where the compiler touched you

Max Facetime
Apr 18, 2009

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

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
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

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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 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

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

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
PL thread: WASM *airhorn* faaaaaaart

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

prisoner of waffles posted:

PL thread: WASM *airhorn* faaaaaaart

here we come a WASMing

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Gazpacho posted:

show us on the doll where the compiler touched you

*dereferences dilznick*

Soricidus
Oct 21, 2010
freedom-hating statist shill
it secretly stands for white american straight men, and I want nothing to do with it

Aramoro
Jun 1, 2012




Also all coding for browsers is inherently garbage to be avoided in the first place.

Xarn
Jun 26, 2015

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.

feedmegin
Jul 30, 2008

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 :sun:

creatine
Jan 27, 2012




i started learning c because i want to try making some algorithm stuff for work

Workaday Wizard
Oct 23, 2009

by Pragmatica

creatine posted:

i started learning c because i want to try making some algorithm stuff for work

what kind of algorithm?

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Xarn posted:

...
gently caress, I can't make this into a bit, but anyway


memory writes are a lie
int overflow is a lie
etc
etc
Thx 3 proving my point heh

creatine
Jan 27, 2012




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

CPColin
Sep 9, 2003

Big ol' smile.

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.

Max Facetime
Apr 18, 2009

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

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
so, gzip compiled to WASM?

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

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

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

y tho

Workaday Wizard
Oct 23, 2009

by Pragmatica

creatine posted:

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

nice! godspeed!

creatine
Jan 27, 2012




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

Aramoro
Jun 1, 2012




creatine posted:

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

There are easier languages to use than C but if you're enjoying it and its working out then have fun!

Max Facetime
Apr 18, 2009

Suspicious Dish posted:

so, gzip compiled to WASM?

yea but Win7z


apparently JavaScript is a bad PL for expressing programming semantics :monocle:

when you are Facebook and have too much JavaScript this becomes a big problem

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
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.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

creatine posted:

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

write this in Common Lisp and then optimize it by adding in type declarations

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

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.

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.

i have no idea what you're trying to say here

mystes
May 31, 2006

Suspicious Dish posted:

i have no idea what you're trying to say here
Probably "why doesn't webassembly have a bytecode" so I'm guessing his information is slightly out of date.

a few DRUNK BONERS
Mar 25, 2016

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"

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

Max Facetime posted:

apparently JavaScript is a bad PL for expressing programming semantics :monocle:

when you are Facebook and have too much JavaScript this becomes a big problem

If that's the problem, why is this bizarro AST-building exercise the solution?

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

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

Soricidus
Oct 21, 2010
freedom-hating statist shill

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

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

and then throw it away completely and just use the jvm or .net clr like grownups

brap
Aug 23, 2004

Grimey Drawer
:allears:

Adbot
ADBOT LOVES YOU

Vanadium
Jan 8, 2005

if you want a non-js-based bytecode, why arent you just shipping java applets

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply