« first day (2422 days earlier)      last day (2360 days later) » 

07:58
More MathLink notes. For those interested in making a link to another language the functions MLPutArrayFlat and MLPutArray in the JLinkNativeLibrary.c file contain good Java implementations for inspiration.
Those two and MLGetArray have been by far the toughest to translate
 
6 hours later…
13:35
I don't have M12 pre-release, does anyone know if the UnityLink is available in M12?
13:53
@Kh40tiK I think discussing such details without explicit permission from WRI would be a breach of license agreement... not that I would have a pre-release.
@b3m2a1 Just want to make sure that you were following the developments in the ExternalEvaluate/Python thread on W|C community.wolfram.com/groups/-/m/t/1185247 (also @Kh40tiK)
@Kh40tiK Prerelease testers are made to promise that they won't discuss the betas (or any new technologies) in public
 
2 hours later…
15:51
@halirutan - have you had any reported issues with the editor-button chrome extension lately? I just noticed they don't have any effect when pressed, can't say when it started happening, just noticed today
@JasonB. Yep
17 hours ago, by m_goldberg
@halirutan. Sorry to bother you, but am having problems with your editor buttons javascript. The buttons appear in the editor toolbar, the tooltips work, but clicking on any button produces no action. Any advice?
16:33
We aren't a full week into classes and I'm already procrastinating from grading; this time by learning some LaTeX (got to have pretty lesson plans...) I'm trying this to integrate Mathematica scripts into a .tex document and am wondering if there's an easier way. (The purpose here is to be able to generate worksheets with random numbers/problems.)
17:14
@halirutan all I had to do was scroll up.....
17:53
@JasonB. The big question is what we do about this. I'm short on time and had a divorce with JavaScript before we even loved each other.
18:52
@halirutan I can take a look if you show me where the code lives (js developer in a past life)
19:10
@CarlLange Let me give you some hints: This is what doesn't work anymore.
@halirutan cheers
The userscript uses this all over the place as its main feature is to inject or replace markdown inside the SE editor.
Basically, we look at the structure of an SE Q&A site, find the correct positions of the editor buttons and inject some of our own. I debugged through wmd.js which contains the functionality that SE uses to make their buttons work, but I only looked at the reformatted minimized code and it's awful.
I hoped to understand how SE replaces and injects markdown with their italics button and I found the right place, but still, JS drives me crazy.
ah, is straightforward
the element's just not where it used to be
var button_row = $(this);
var editor = button_row.parent().siblings('.wmd-input');
editor doesn't resolve correctly
@CarlLange I was suspecting something like this.
two seconds and I'll get the right selector for you
and put in a PR :)
at least this is nice and easy
19:18
@CarlLange That would be nice.
ok, actually a few more than two seconds, my dinner is ready ;) Do it for you before the end of the night
@CarlLange Take your time.
If you like, you can check if there is any http things in the script that should be https now.
I remember fixing this already.
20:12
I also looked for https, didn't find anything
I'm relatively happy to take on maintenance of this if you don't want to :)
@CarlLange Well, it ran almost untouched for several years now, but I'm more than happy to have someone I can rely on. I really don't like JS.
I just did it because no one else stood up and we needed something.
Yep, happy to do it
That's nice. Thanks!
No problemo :)
btw, shockingly well commented for javascript :)
@CarlLange How on earth do you think I would have known anything after 2 weeks if I didn't comment it? :)
20:21
and that's how you get the node-js ecosystem ;)
 
1 hour later…
21:37
@CarlLange OK, everything merged, updated version and chrome extension. Locally it works and it's only a couple more minutes until the chrome store will show the update. Thanks again.
@m_goldberg @JasonB. and everyone else: @CarlLange found why exactly the editor toolbar is non-functional and fixed the issue. I have updated the GitHub repository as well as the Chrome Web Store. The new version is 1.4.2.
22:02
@CarlLange and @halirutan - that's great! I just used it to get rid of some \[Psi] symbols in a question
I need to figure out JS myself, to hook into an existing molecule editor
I assume it's just like java but with some scripting capabilities added in, right?
:-D
@JasonB. It's like alcohol. You think it's cool because everyone does it but it only makes you vomit and leaves you with a headache.
Gotcha - so I should try it once, hate it, and then come back to it 20 years later and decide it isn't so bad
@JasonB. I really don't mind the language. I mind the tooling. For instance with this toolbar buttons userscript: I want to edit it in a decent IDE which helps me with good code insight. I like to debug it live and set break-points in the IDE. All this seems not to be possible. I asked in a different room about this and it seems even the pro-devs simply debug in the browser and hack in an editor.
22:26
chrome's devtools are basically an IDE these days, but I use emacs to do that
it is possible, it just takes a long time to setup
I set it up for myself about a thousand years ago and definitely couldn't do it again today
I do find myself constantly going back to edit previous commands in the JS console the way I edit Input boxes in a mma notebook though
it's honestly a perfectly good language that is maybe inappropriately used nowadays, since better options like typescript or clojurescript exist
The pace of the language is another problem though, things tend to trend a lot more in JS than they do in say, Python. So you need to keep up to date with the newest way to do functional programming or OOP or promises or or or
in python or many other languages, there's One Sane Way, or maybe A Few Sane Ways, but in JS it's every Way for itself
@CarlLange I used a Jetbrains plugin for Chrome that let's you life-debug JS code and it kind of worked. But then again, there were so many dependencies of the website which made it really hard. It is just so different from writing other languages like Kotlin, Java, Swift or even C.
@halirutan Yeah, it's definitely different. There's a lot more you have to load into your head and a lot less you can depend on to be sensible
@CarlLange My biggest problem is that I don't need it and I don't use it. No good start if you want to learn something.
@halirutan Hah! Yep, that's a poor starting position alright :)
glad to hear I didn't break anything with the extension anyway. happy to be called on in the future if changes need to be made
@CarlLange I was wondering if it would be more "future-save" to use the functions that the SE code has already loaded. I'm not so sure because I know how fast JS changes.
22:37
@halirutan I'm not sure I understand you, could you rephrase?
@CarlLange Yep. When you debug an SE page, you see that there is a wmd.js script. This contains all the functionality that SE uses to do stuff with the editor. Especially, if you press the italics I on the editor, you see that it does exactly the same as our script. It takes a selection and makes stars around it or if there is no selection, it injects a template.
So instead of working with the selections and making replacements, we could simply define another function that uses this framework.
@halirutan Yep, totally agree
The important part seems to be
w.doBold = function(e, t) {
    return this.doBorI(e, t, 2, this.getString("boldexample"))
}
,
w.doItalic = function(e, t) {
    return this.doBorI(e, t, 1, this.getString("italicexample"))
}
,
w.doBorI = function(e, t, n, i) {
    e.trimWhitespace(),
    e.selection = e.selection.replace(/\n{2,}/g, "\n");
    var r = /(\**$)/.exec(e.before)[0]
      , a = /(^\**)/.exec(e.after)[0]
      , o = Math.min(r.length, a.length);
    if (o >= n && (2 != o || 1 != n))
        e.before = e.before.replace(f("[*]{" + n + "}$", ""), ""),
I'll take a look at it in the next few days. It certainly seems possible.
would you add an issue for it so I don't forget this context?
The source-code (non-minified) seems to come from here github.com/StackExchange/pagedown
@CarlLange Yes, I can make an issue and ping you there. If you are in the mood or have time to kill, maybe you want to have a look.
Cheers. I'd be delighted to take a look.
It's coming into winter here in Ireland so my day job of hiking around the country has less hours than usual ;)
@CarlLange Ahh, yes. I remember stalking you and I know you are hiking and basically not doing programming at all :)
So I've got plenty of time to fart about with javascript!
@halirutan Yeah, most of my programming time is me avoiding the weather or procrastinating from video editing :)
@CarlLange If you don't mind me asking, can you make a living from your hiking videos?
22:51
@halirutan Not a very comfortable one. We've got a Patreon patreon.com/toughsoles which covers a good amount of our cost, but we mostly camp a lot and spend little. We don't have ads on youtube or anything so our income is basically patreon and people who've bought prints from us in the past (my girlfriend is a professional photographer)
But it's been more income than we expected, and it's growing. It'll certainly never be as much as I could make programming.
But it's definitely really enjoyable, engaging work, and we sometimes meet people who went on their first hike because of our videos, and that's really a priceless thing.
@CarlLange Yes, I can imagine. I have a lot of fun things that I wanted to pursue "officially" but they wouldn't pay enough and I have to have a safe income with more than enough kids
@halirutan That's really the trick, we have managed to avoid responsibilities like that so far ;)
@CarlLange It's OK really. I love it that way. I'm not into hiking but I'm definitely into teaching.
And that's what I can do all the time when I'm home.
@halirutan That sounds really great. I definitely enjoyed writing a lego image classifier with my 6-year old nephew a few weeks ago :)
@CarlLange During the last weeks I explained a lot about waves (my oldest is 6, so at that level). Water waves and sound waves and we made experiments. Last weekend I thought about visualizing the sound-waves and mixed a non-newtonian fluid with my kids and misused my stereo.
That was definitely worth it. My wife was the one who was surprised the most. Couldn't believe it.
23:02
@halirutan Ah, very nice. It's so important to cultivate curiosity and interest in people
@halirutan @CarlLange Thanks to both of you for your quick work in fixing the problem. I have installed v,1.4.2 into Ninjakit on Safari 11.1 and all functionality seems to have been restored.
@halirutan reminds me of Doom :D
@m_goldberg Happy to help.
@m_goldberg That's good to hear.

« first day (2422 days earlier)      last day (2360 days later) »