« first day (2655 days earlier)      last day (567 days later) » 

6:18 AM
1
A: Create an array that grows at a regular interval on Matlab

EdricYou can do this by using nested functions. Nested functions allow you to access "uplevel variables", and you can modify those. Here's one way to do it: function [a, fcn] = buildTimer() period=5;%period at which the file should be updated freq=4; l=freq*period; time=0; function time_append(~...

This is neato!
 
7:18 AM
What's the easiest way to get the "logical" intersection of multiple arrays in Python/NumPy? So far I've been using np.bitwise_and() and nest that as often as I need, but that's not very pretty
 
 
2 hours later…
9:03 AM
@CrisLuengo well, yes and no I'd say. Now that I am working on a group that is trying to figure out the maths of ML, many of the real maths of why it works are not even there. The more pure mathematicians studying ML here only analyze 3 layer perceptron networks because the math is too complicated in bigger sstuff
@Adriaan thats what I do too, but I never needed to do more than 3 so dunno
 
9:31 AM
stackoverflow.com/q/73985071/5211833 where's the "You pressed run on a function" dupe again? I always forget that one...
 
no I don't think so
its "f needs more than 1 argument" I think, but what is f?
 
@AnderBiguri OP confirmed they pressed run
 
but that is not the error they are getting though
 
Doesn't that error simply trigger on the first line within the function?
 
you are right, I remembered worng
I kinda never realized that if you don't give input arguments, but the function doesn't use the ones in the function definition, it doens't error
 
9:38 AM
@AnderBiguri you mean like function mysum(a); sum(1:10); end and call it as mysum() doesn't error?
 
exactly
or pressing run
 
I am a bit sad that people keep asking these questions over and over. It's literally faster to type the title into Google and read the first result than to write up your whole post on SO, then answer comments and having your posts closed as a dupe of something you could've found in under 10 seconds searching
 
Its an attitude thing, and I kinda get it. When you first stat programming, you still have not developed the skills (and just, the entire concept) that it is not about "knowledge" as much as it is about being able to figure out how to do stuff yourself. This concept/skill takes a bit to develop, and the most natural thing is to just ask instead of assuming someone has had the same problem.
If instead of programming we were talking about a random engineery/math concept, it would be suddenly super hard to find specific answers to specific issues. That self reliance is also something that is learnt, and well, that means many people haven't learnt it yet
I appreciate the issue, but then it just means that for people like us, voluteering our time to help random MATLAB questions, big part of our time ends up being telling these people that they can indeed, rely on google.
which kinda sucks as a way to volunteer your time XD and makes us bitter
 
@AnderBiguri mhm, I disagree with the last sentence here. If I'm stuck somewhere, I want an answer as fast as possible. Chucking the error message (or whatever your title is) into Google directly usually gives fast results, especially with error messages.
Thus it's faster, less writing and therefore more convenient for me to chuck the error message at the internet, read the first result it spits out and fix the problem
 
Yes, but many students don't know that chucking the results in Google will give that, so they don't even consider that a viable option
When I was teaching programming to first years, that was always the thing I needed to teach in the first few weeks
they would look at me baffled with an error message, and I would ask them "have you tried googling"? and they would go "what? why would that work?". So I would sit with them and go trhough the process of how to google it, identify the right results, ettc
even I taught some people the format of Stackoverlfow, question top, what is an answer, etc
 
9:54 AM
So you know the internet exists, somehow you've encountered Stack Overflow (presumably through googling for a programming problem) and then ... still post a crappy researched upe on SO, rather than reuse that Google-fu that led you to SO to quickly find the answer?
 
I tauch first year engineering students in 2018 how to CTRL+C CTRL+V
instead of Edit->copy in the crhome menu
you understimate how little people know XD
 
Although, to concede to your point, if you don't hit a sour old pain in the so-and-so like me on Stack Overflow it's highly likely someone will write an answer which you can directly copy-paste without having to think about it. That's probably more convenient that understanding some programming blog written in Indian English and trying to figure out how to apply it to your own code
 
I genuinelly think that albeit it sounds terrible to put in a CV, our biggest streght is "I can google shit fast"
3
which having been involved in academia just enhances
 
I can understand that knowing how to use a search engine helps loads. But still, how can you not know to chuck an error message into Google, but do know how to take several minutes to write up a SO post?
 
I think its just more the concept of self-learn. Many educational systems just don't teach you to self-learn. You learn what is taught to you, and that mental step of suddenly you being the source of knowledge seeking, its not trivial to some students, I think
I do remember going through that in my first year at uni
albeit I totally get your frustration, I tend to help less in SO these days because I got a bit burnt out from googling stuff for others
 
 
3 hours later…
1:40 PM
@AnderBiguri nifty!
 
2:04 PM
@AnderBiguri This is exactly right. It’s so normal for us to Google an error message, we don’t realize it is not obvious for someone that has never done that.
 
@AnderBiguri I saw it!
Quite cool!
Not sure whether it has any impact on computing matrix multiplications though:)
 
I learned programming from books. I actually read physical books to learn about algorithms and data structures. Last year I had to point out to the people doing the Stack Overflow developer survey that books are a thing you can learn from.
Things you have never done are never obvious.
@AnderBiguri True. I meant the algorithms, not the math.
 
@flawr well yes, if it produces better algorithms! Maybe MATLAB will change all the codebase to use the output of that!
@CrisLuengo look at this oldie
(I have also read some books hehe)
@CrisLuengo yes, but still things like transformers or diffusion models are super new!
 
@AnderBiguri don’t they all use the same backpropagation algorithm to learn? These are just different architectures, no?
 
Yes I guess... But backpropagation itself is not really an "algorithm", its just a gradient learning method with the chain rule
this is from the 70s, but from the 1470s not 1970s :D
 
2:17 PM
@AnderBiguri I'd consider backpropagation as an "algorithm", but just as a way for computing the gradient
 
fair, but its just kinda, a big chain rule anyway. Its also mostly only interesting as a computing algorithm, mathematically speaking, you can interpret it as a matrix
 
@CrisLuengo they do, but how they are work is quite fundamentally different. at that point you don't even care all that much about the details of the architectures, these are more about the "macro-architecture"
man do I sound intellligent writing with these words
@AnderBiguri back in my day they called it dynamic programming
 
@flawr hehe
well, talking about backpropagation: arxiv.org/abs/2209.12892
 
also I don't understand how people keep stressing the chain rule when it comes to backpropagation, there are many more derivative rules that go into this
 
a paper that trains a neural network to find the best parameters for a neural netowrk
 
2:21 PM
@AnderBiguri have they applied it to their own network?
 
hahaha while(1)
 
I feel like they didn't forget many of the buzzwords that are currently en vogue:)
 
@AnderBiguri I find it scary that “provably correct” and “probably correct” are so similarly written.
4
 
hahaahha
 
in Spanish you would even pronounce them the same. :)
 
2:23 PM
often the author doesn't know which one they mean
 
Honestly, every time I see this in an article I mis-read it at first. “Probably correct? How is that useful? Oh!”
@AnderBiguri “a gradient learning method” = an algorithm. :)
Do you know how the first neural networks were trained? Before the backpropagation algorithm was discovered?
 
no, how/
 
rolling dice until you got something that works? :)
 
I don’t either! I’m pretty sure it was just trial and error, tweaking weights until you get better results.
 
make baby, teach task, inspect babys neurons, copy signal intensity
 
2:27 PM
The thing is, we’re still using the same shit, and it sucks!
@AnderBiguri lol!
 
posted on October 07, 2022 by wcampbell

Will's pick this week is Random String Utility by Dan Couture. This is an oldie but a goodie. This submission is from 2012 but still works just fine in R2022b (another testament to the... read more >>

 
@Adriaan probably np.logical_and.reduce(arrays). Do note "logical" instead of "bitwise".
 
2:55 PM
@AndrasDeak--СлаваУкраїні that should work with & too, shouldn't it?
 
3:19 PM
Yes, but & for bool arrays is logical_and, semantically
Bitwise syntax, logical semantics
 
 
5 hours later…
8:26 PM
@AnderBiguri here's also a nice wrapup of one of my favourite math blogs: cp4space.hatsya.com/2022/10/06/matrix-multiplication-update
 
 
3 hours later…
11:00 PM
@LuisMendo In an overdrive pedal, instead of just flattening peaks, what if we would make them go down again?:)
Playing with some ideas with funky transfer functions (x=input voltage, y=output voltage)
 

« first day (2655 days earlier)      last day (567 days later) »