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
Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Nippashish posted:

lua seems like a really bizarre choice but it actually strikes a really good balance between flexibility, speed and ease of use in a way that no other language has managed. also the core torch7 libraries are really good.

it would be nice if lua had a decent standard library and support for parallelism, though

or a debugger or profiler

Adbot
ADBOT LOVES YOU

Nippashish
Nov 2, 2005

Let me see you dance!
starting a bunch of luajit interpreters in the same process and sharing tensors between them with some ffi magic is not too bad

a debugger would be p ace tho

fritz
Jul 26, 2003

JawnV6 posted:

i had to divide by 1000

so i shifted by 10 bits and adjusted some algo constants to account for the 2.4% error

yeah! yeah!

(you could also mix in a shift-by-16 and a shift-by-17 to get even closer!)

fritz
Jul 26, 2003

i found a paper on doing a svd in CORDIC and depending on what kind of processing we wanna do on the device i might have to dehumanize myself

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Subjunctive posted:

it would be nice if lua had a decent standard library and support for parallelism, though

or a debugger or profiler

https://github.com/pkulchenko/ZeroBraneStudio

it's not very good but better than nothing

luajit has a reasonable good built-in profiler. there's a few profilers for puc lua but none that are really worth using

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

today this thread led me to naively ask the Torch BDFL why we use Torch instead of something else. thanks, thread.

DimpledChad
May 14, 2002
Rigging elections since '87.
oh god sorry. i knew you guys were involved with torch but,

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

it's cool, I was going to be introduced to him soon anyway I'm sure

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Nippashish posted:

memory networks have a way to do this which seems to work pretty well, but isn't perfect (which is why they need to label supporting facts when they train on their qa tasks).

Jason and co just published a paper about an improvement that removes the need for the supporting facts to be labeled in the training data, BTW: Weakly Supervised Memory Networks.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

and this helps with lua debugging a fair bit: https://github.com/facebook/fblualib/tree/master/fblualib/debugger

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED
why do we have source code management that treats source code as bytes instead of, you know, source code? i would like to see errors if my branch calling foo(bar) merges a branch changing the signature of foo to foo(bar, baz). yeah, the compiler does this, but don't we want to know about errors as soon as possible, and not 20+ minutes into a build?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Pie Colony posted:

why do we have source code management that treats source code as bytes instead of, you know, source code? i would like to see errors if my branch calling foo(bar) merges a branch changing the signature of foo to foo(bar, baz). yeah, the compiler does this, but don't we want to know about errors as soon as possible, and not 20+ minutes into a build?

like which language's source code should it be treated? when you change compilers, do your historical diffs reflect the new semantics or the old? does it mean you can't check in syntax errors?

comedyblissoption
Mar 15, 2006

you could run your static code analyzer (compiler) after you merge and before pushing your changes

comedyblissoption
Mar 15, 2006

also most source control systems will treat text files as text and not just raw bytes when merging

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

how would it detect the error faster than you would by compiling? if it can, why doesn't the compiler do that?

comedyblissoption
Mar 15, 2006

also what youre thinking about seems like it exists:
https://www.semanticmerge.com/

I have no idea how good it is in practice over text-based source code merging

I've gotten by fine so far w/ static type analysis and tests

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

Subjunctive posted:

like which language's source code should it be treated? when you change compilers, do your historical diffs reflect the new semantics or the old? does it mean you can't check in syntax errors?

obviously the tools would be language-specific. and like you point out, they may even need to be compiler specific.


comedyblissoption posted:

also most source control systems will treat text files as text and not just raw bytes when merging

yeah you're right, files are kinda the fundamental abstraction. but why not functions, classes, or modules?


Subjunctive posted:

how would it detect the error faster than you would by compiling? if it can, why doesn't the compiler do that?

well, the compiler is probably the one going to be doing that. imagine the SCM tool calling into the lexer/parser when you make a commit or merge a branch. you wouldn't even be able to commit code that would obviously break the build to your repo. and the compiler isn't the first thing running in my build.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Pie Colony posted:

why do we have source code management that treats source code as bytes instead of, you know, source code? i would like to see errors if my branch calling foo(bar) merges a branch changing the signature of foo to foo(bar, baz). yeah, the compiler does this, but don't we want to know about errors as soon as possible, and not 20+ minutes into a build?

i think u want a really good static analyser? there arent any perfect ones, but there are some that may be good depending etc

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

Snapchat A Titty posted:

i think u want a really good static analyser? there arent any perfect ones, but there are some that may be good depending etc

nah, think of it as just being a more useful abstraction. i can't count the amount of times i've been viewing diffs on github and some extra spaces or tabs or something else makes the formatting incredibly hard to read. that stuff's not useful to me, show me the actual code that changed.

i'll admit i''ve been :420: all day though

Pie Colony
Dec 8, 2006
I AM SUCH A FUCKUP THAT I CAN'T EVEN POST IN AN E/N THREAD I STARTED

comedyblissoption posted:

also what youre thinking about seems like it exists:
https://www.semanticmerge.com/

I have no idea how good it is in practice over text-based source code merging

I've gotten by fine so far w/ static type analysis and tests

oh nice, this is actually exactly what i mean. this seems pretty sweet

Mr. Glass
May 1, 2009
"static analysis" is a euphemism for "hacky tools i have to use because my programming language doesn't have an expressive enough type system"

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Pie Colony posted:

nah, think of it as just being a more useful abstraction. i can't count the amount of times i've been viewing diffs on github and some extra spaces or tabs or something else makes the formatting incredibly hard to read. that stuff's not useful to me, show me the actual code that changed.

i'll admit i''ve been :420: all day though

oh yeah i "thought up" that once too, assuming i read your thing right, like, diff the actual tokens instead of whatever whitespace around them??

i think the easiest way is just to have like a commit-hook linter to enforce style

Nippashish
Nov 2, 2005

Let me see you dance!

Subjunctive posted:

Jason and co just published a paper about an improvement that removes the need for the supporting facts to be labeled in the training data, BTW: Weakly Supervised Memory Networks.

this (softmax instead of max margin) is how google's ntm works. ive been wondering if they tried this for the original memory networks paper or not and im about even money on it didn't work with the freebase qa task vs jason loves max margin and didn't try anything else.

Nippashish
Nov 2, 2005

Let me see you dance!

the fblualib stuff has been unusable because of the second clause in the PATENTS file but apparently that is literally changing as we speak which is pretty awesome and i am legit looking forward to trying this out.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Pie Colony posted:

well, the compiler is probably the one going to be doing that. imagine the SCM tool calling into the lexer/parser when you make a commit or merge a branch. you wouldn't even be able to commit code that would obviously break the build to your repo. and the compiler isn't the first thing running in my build.

to model C++ and catch things like signature changes you need to see all the includes and preprocessor configuration, so it will need build configuration information. it can't operate on a file at a time in isolation.

this is why people do code indexing as part of real compiler pipelines and build processes. you need template expansion and checking for symbol collisions (so it has to understand scope) and overload resolution and all that jazz.

you can already make a commit hook that builds the tree and runs tests if you want (or push to a staging branch that is only and automatically promoted when it's green, which works nicely)

Soricidus
Oct 21, 2010
freedom-hating statist shill

Mr. Glass posted:

"static analysis" is a euphemism for "hacky tools i have to use because my programming language doesn't have an expressive enough type system"

"expressive enough type system" is like "sufficiently smart compiler". if you think you've found one, you're missing something

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

how is a powerful type system not exactly static program analysis?

Brain Candy
May 18, 2006

Soricidus posted:

"expressive enough type system" is like "sufficiently smart compiler". if you think you've found one, you're missing something

yup

Mr. Glass posted:

"static analysis" is a euphemism for "hacky tools i have to use because my programming language doesn't have an expressive enough type system"

lil' Hilbert, some things are true but aren't provable

comedyblissoption
Mar 15, 2006

Subjunctive posted:

how is a powerful type system not exactly static program analysis?
if you want to get into a wrong obnoxious semantic debate

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

comedyblissoption posted:

if you want to get into a wrong obnoxious semantic debate

if my compiler infers types to detect error it is an elegant tapestry of computer science, but if I use a different tool to do it it becomes an ugly hack, sullying all things it touches.

raminasi
Jan 25, 2005

a last drink with no ice

Mr. Glass posted:

"static analysis" is a euphemism for "hacky tools i have to use because my programming language doesn't have an expressive enough type system"

this is why i prefer c++. its turing-complete type system makes it trivial to statically analyze.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
in practice things called "static analyzers" are basically typecheckers that sacrifice some soundness for completeness. a more expressive type system makes this tradeoff useful less often, but no one has managed to make a sound and complete type system that you can realistically write useful programs in, so there's theoretically always going to be room for a "static analyzer"

comedyblissoption
Mar 15, 2006

Subjunctive posted:

if my compiler infers types to detect error it is an elegant tapestry of computer science, but if I use a different tool to do it it becomes an ugly hack, sullying all things it touches.
yah static analysis = type system i meant if you want to start the worst debate possible you would try to make a distinction

comedyblissoption
Mar 15, 2006

lets all try to define what a type is

fritz
Jul 26, 2003

i dont fully see what kind of type system would catch some of these errors: http://clang-analyzer.llvm.org/available_checks.html

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

fritz posted:

i dont fully see what kind of type system would catch some of these errors: http://clang-analyzer.llvm.org/available_checks.html

which ones? dead store is the only one that doesn't seem completely trivially using only features in existing real type systems

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

yeah, I think Rust alone catches half of them.

sarehu
Apr 20, 2007

(call/cc call/cc)

Pie Colony posted:

why do we have source code management that treats source code as bytes instead of, you know, source code? i would like to see errors if my branch calling foo(bar) merges a branch changing the signature of foo to foo(bar, baz). yeah, the compiler does this, but don't we want to know about errors as soon as possible, and not 20+ minutes into a build?

Jews.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

the "ignore whitespace" problem was solved in 1875 or something, fwiw. it doesn't require language processing

Adbot
ADBOT LOVES YOU

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
ideally you'd want to only ignore non-semantic whitespace changes, which does require language processing

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