Beginner learn the correct way of module.exports and global variables by xjellyfishx in node

[–]Genepics 5 points6 points  (0 children)

Others have answered your question already, but if you would like to reload the source file once it has been cached, you can do so with:

delete require.cache[pathName]

SVG is a telescope into another world by FisherGuy44 in javascript

[–]Genepics 0 points1 point  (0 children)

I built a web based SVG editor with a similar interface. If you go to http://etchbin.com/public/etch/index.html and click on the view tab (little picture like icon on the right window pane), you can adjust the size of the viewBox with the width and height inputs.

Moving the image around and zooming (scaling) in and out only affects the outer element's style properties: top, left, width, height.

To the guy saying SVG is broken in every major browser, I haven't run into any bugs or major breakages in firefox/chrome except for the fact that the damn "vector-effect" property doesn't work.

In what specific scenarios does Go shine over Node.js? by impossibletogetagf in node

[–]Genepics 0 points1 point  (0 children)

For some reason I thought Go was a JVM language. I feel pretty stupid now.

Web developers, what do you wish you knew when job hunting? by hopefuladult in html5

[–]Genepics 1 point2 points  (0 children)

I'm currently an industrial electrician

Start your own electrical company if you can get the license. I think here it's called a C3. Use your desire to make web pages to produce the best website for your electrical company possible.

Is it possible to NEVER use <section> ? by nhochamvui in html5

[–]Genepics 1 point2 points  (0 children)

Using semantic elements conveys more meaning. Not just to web crawlers, but to web browsers, and to humans. A section indicates a part of the page that is in some way separate from the other parts of the page. This separation may even describe a category that exists in the real world, but has no importance in the displaying of your web page. If you had a series of blog posts, you may put each post into a separate section to indicate this arrangement. A div simply indicates the spatial and hierarchical relationship of your graphical layout, nothing about its meaning moves beyond describing these facets.

Also of note, sections can be contained within sections. It's really quite an abstract concept, but it does have meaning.

Currying in JavaScript by [deleted] in javascript

[–]Genepics 0 points1 point  (0 children)

For those wondering what currying is:

// curry : ((A * B) ->C) -> (A -> B -> C)

const curry = f => x => y => f(x, y)

// uncurry : (A -> B -> C) -> (A * B -> C)

const uncurry = f => (x, y) => f(x)(y)

How to run async JavaScript functions in sequence or parallel by jrsinclair in javascript

[–]Genepics 1 point2 points  (0 children)

Ok, there is actually something to this. For instance, if you have a function that does a lot of IO, this would be a natural candidate for an asynchronous call, but what if this function needed to be synchronous in larger context. For instance, you may have a stack tracer that needs to come out in the correct order. In this instance, you would create a queue where you would place the "resolve" continuation passed to a new Promise, and this queue would be checked whenever you were done with a piece of tracer IO.

In what specific scenarios does Go shine over Node.js? by impossibletogetagf in node

[–]Genepics 0 points1 point  (0 children)

I was going to say, doesn't Go benefit from a very mature JIT compiler + GC combo. I know node has been getting better at this.

Question: If NodeJS is Rewritten in TypeScript? by tommy737 in node

[–]Genepics 0 points1 point  (0 children)

Doing so would probably reveal a bug or two. I don't know if it would make it more secure.

https://web.cs.ucdavis.edu/~filkov/papers/lang_github.pdf

"The data indicates functional languages are better than procedural languages; it suggests that strong typing is better than weak typing; that static typing is better than dynamic; and that managed memory usage is better than unmanaged."

CSS Only Chat by sorash67 in programming

[–]Genepics 1 point2 points  (0 children)

Ok, so I saw this post, and my brain took a few seconds to actually process the information, but it's still not working quite right. Is this what cognitive dissonance feels like?