« first day (2519 days earlier)      last day (694 days later) » 

7:32 AM
@Adriaan Is there a badge for posting essentially the same comment at exactly the same time?
 
@CrisLuengo if only :P
That user simply seems to have their data transfer bungled in an obscure way. Given they changed their CSV contents since last question, I think they should be able to have a much more appropriate way to load and use their data
 
It's one of the many cases of confusing code and data. The variable names are data, not code, and therefore shouldn't be variable names.
 
8:23 AM
@AnderBiguri @AndrasDeak--СлаваУкраїні a few months later: gweb-research-imagen.appspot.com
 
8:42 AM
@CrisLuengo mhm, it's actually not trivial to create nested field names in structures...
 
Amazing @flawr
Ive been reading about few other network training stuff that I find interesting
liike variational autoencoders, or infoGANs
none of them useful to me, but fun
actually, my group proposed a couple of years ago something called an "adversarial regularizer"
instead of regularizing your optimization problem with a normed function, you plug it a GAN
 
Gans used to be all the rage but I feel like you don't hear much about them anymore. afaik they are a pain to use. But this diffusion stuff looks fun
 
8:58 AM
I think the main issue is that they are a great toy, but they are not super useful in applied stuff
qhen you want to do something real, rather than "look, ML is cool"
 
9:25 AM
E.g. fake photos and videos for nation states? Sounds useful to me :P
 
I just found it funny about how they claim they did not want to publish their code because of ethical concerns. But it's not like you could do similar stuff with photoshop, and I don't think they have any ethical concerns...
But if they write "Google" on their papers this stuff is gonna get published no matter what.
 
@AndrasDeak--СлаваУкраїні sometime thats not even made with GANs, but yeah it is marginally useful. Hugely impactful maybe, but that is arguably a very very niche use case for ML
 
@flawr they sure like their raccoons
 
@flawr its about making it easy to generate thousands per minute
 
@AnderBiguri so what? are they afraid their own search engine will be even more full of crap?:)
 
9:29 AM
@flawr random script kiddie would have to learn decent photoshop first
anyone can type in toxic shit and then post it on reddit
 
so nothing would change right?
 
I just think it won't take long until someone copies/rebuild the whole thing and makes it public anyways. So if they actually want to publish stuff and contribute things they should make it public. If they don't want to make it public they shouldn't pretend to do meaningful research.
 
@flawr for GPT-3 and so, I think they release the code montsh later
so its not tha tthey don;t do it, they tend to wait what they would consider more or less enough time to replicate it yourself. But also they tend to give you the code if you are a reputable insittution
Also, most research papers in my field relies on code that is never public
(which is shit, but also how things are)
 
@AnderBiguri that sounds like it makes it impossible to verify the paper's results
 
9:34 AM
right, that's exactly the problem.
I mean that has been a problem for ML stuff for years now that even if you have access to the code and all it's hard to verify stuff.
 
Hey guys! Long time no see :) I don't even know if you remember me
 
So publishing it by now should really be required imho.
 
I see there are still the same people in here than in 2016 though
 
@BillBokeey Hey bill, welcome back!
 
10:10 AM
@Adriaan yeah its the way it is though. I always encourage publication as code, but cant enforce it when I am reviewer :(
@BillBokeey oh wow, hello!
 
@AnderBiguri but then you can't sign off on the code. Who knows whether in their fancy image-warping/filtering paper they haven't simply coded load original.png; imshow(original); load new.png; imshow(new)
 
You can't know
 
parts = {'a', 'b'};s=struct;
>> s.(parts{1})=1
s =
    a: 1

>> s.(parts{1}).(parts{2})=1
s =
    a: [1x1 struct]

>> s.('a.b') = 2
??? Invalid field name: 'a.b'.
 
because it resolves as 'a.b' not as 'a'.'b'
it thinks the point is part of the fieldname
 
Mhm. I'm still trying to solve this question (ignoring it smells badly of XY, as Cris said).
@AnderBiguri yea, which is a problem :P
So is there a way to dynamically create nested field names? One could list all the possible parts{} combinations into a big if statement, but that's not very elegant. One could eval the shit out of this thing, but we don't want that...
I can create a single field in a struct, but even a field within a field in a struct is already posing difficulties
 
10:25 AM
you meant the one you showed? >> s.(parts{1}).(parts{2})=1 ?
its normal this is not easy to do, its bad approach. All this is doing eval without the eval
i.e. it seems we are just trying to replicate the reason we say eval is bad, byt simply not using eval
XY problem, in the sense we are trying to avoid X because a problem, and instead doing Y, but it has the same problem XD
 
@AnderBiguri That works, but the problem is: there's no fixed number of parts{}. So to do this without eval, you'd need an if length(parts)==1; s.(parts{1}) ; elseif length(parts)==2 etc etc
 
@Adriaan i.e. you are coding the reason why we say dynamic variables are bad
eval is just an easier way to do that bad programming pattern
 
@AnderBiguri partly; it's not a great idea to create your variables like this (as Cris and I have told the OP), but OTOH building a solution for this would eliminate the JIT-disabling, which is what caused them to ask the question in the first place
 
The real solution is a different way to store this information
 
@AnderBiguri eh, not really
this is at least safe
 
10:29 AM
@AnderBiguri which I've prompted them for, twice. On their previous, now deleted question and again on this one. They won't say how they create/get the CSV, nor what they use it for.
 
@AndrasDeak--СлаваУкраїні I think safety is overexagerated when we talk about MALTAB
 
still avoidable if possible, but without dicts (unless someone knows about containers.Map) this might be the closest thing
@AnderBiguri how so?
 
most people have shitty scripts that is only for their 3 month work in 1 paper
(in MATLAB)
 
ah
I tend to believe that if you don't teach people security when it's only a "best practice" they won't know to think about it when it's crucial.
2
 
^
Which is why I keep telling everyone in all applicable SO answers of mine to stop using i as a loop variable.
 
10:31 AM
All to often I hear "yes, I know this has a SQL injection vulnerability, but this is just for myself, if I have to make it secure later I'll do that". 1. no you fucking won't. 2. when you start writing code for prod you also won't remember to use parametrised queries.
 
Yes, yes, but I don't think its "never use eval for security!", its instead "careful with eval, if this is public code in some cases it may create serious security issues!", which is kinda different
 
@AnderBiguri yes, I think it should 100% be the former
"in some cases it's insecure": wrong. It's always insecure, and in some cases it doesn't bite you in the ass!
 
In any case, most uses of eval don't even use user inputted strings either! its not like in SQL
 
when you make the big red warning a footnote it stops being a big red warning
people just discard that shit
@AnderBiguri whether or not it's "like in SQL" depends on the code.
 
that is fair, and I agree eh, just think that its a very different thing that in SQL. Because users and applicatiosn are radically different
Yeah, like warning someone to be careful at 80km/h in a bike. Can happen? yes. Shoudl they be warned? Yes. But its not the same as for a car
because 99.9999% of people won'e even come close!
 
10:34 AM
except everyone travelling 80 km/h on a bike feels that shit can go wrong very easily
people with SQL injection vulnerabilities have zero clue
 
in any case, I kinda agree, and I still say that thing about eval an security when I answer in SO :D
 
@AndrasDeak--СлаваУкраїні *too
 
In any case, for that question, can't you strsplit the var name, detect numbers (to make an array) and just apply them?
ah you commented that already @Adriaan
@Adriaan setfield(data,parts{:},my_data)
it will need some faffing for when numbers are in the middle
 
you mean when a field name would be an invalid key?
invalid name
 
10:45 AM
I guess their use case is a botched de/serialisation attempt
 
 
1 hour later…
11:51 AM
@AnderBiguri does that do nested fields though?
 
12:07 PM
if it accepts the comma-separated list syntax then it damn right should
 
parts = {'a', 'b'};s=struct;
s = setfield(s, parts{:}, pi)

s =

    a: [1x1 struct]
s.a

ans =

    b: 3.1416
s.a.b

ans =

    3.1416
 
Problem is: how to index into one of those fields... One could of course first collect all unique field names, create those and loop over the whole lot s.a(ii).b or so to fill it.
 
getfield :P
Wouldn't just calling setfield repeatedly take care of that for you?
 
@Adriaan no more pythoning? D:
 
12:14 PM
parts = {'a', 'b'};s=struct;
>> s = setfield(s, parts{:}, [1 2])

s =

a: [1x1 struct]

>> s.a

ans =

b: [1 2]

>> s = setfield(s, parts{:}, 1)

s =

a: [1x1 struct]

>> s.a

ans =

b: 1

>> s = setfield(s, parts{:}, 3)

s =

a: [1x1 struct]

>> s.a

ans =

b: 3
seems to overwrite instead.
 
because you are overwriting the same fields?
You want to append to the struct array?
 
Not necessarily append; it needs to go wherever the index points. It's unclear whether those are monotonically increasing through the natural numbers
 
12:43 PM
I think you'd need to to some pre-processing there. If number>1, then remember there are more, store them in sove variable, setfield all of them together
but its gets ugly fast
 
you'd have to first build a tree at which point you'd be back on square 1
 
I ended up undeleting my answer, updating it with the use of setfield and suggesting to use a temporary holding cell to collect variables to allow setting all fields at once afterwards
Left a nice 'n fat disclaimer about the XY problem.
@AndrasDeak--СлаваУкраїні it seems so. Indexing into the lowest field is fine (setfield(s, parts{:}, [array with data])), but having the index on another field, as in their example, is again a whole different ballgame...
 
 
1 hour later…
2:09 PM
Create the indexing operations using substruct and subsasgn. — Cris Luengo 7 hours ago
With substruct you can build up a complex indexing operation step by step. .b.c(5).x.y(3,:). Each ., () and {} is an element in the substruct array. You then use subsref or subsasgn to apply the indexing.
 
2:55 PM
@CrisLuengo oh, that looks even more useful!
I might take a peek at that tomorrow
so something like substruct('.', 'a','.', b, '.', 'c', '()', '2', '.', 'field1') Interesting
Hopefully substruct({'.', '.', '()', '.'}, {'a', 'b', 'c', '2', 'field1'}), i.e. utilising my parts cell basically, works as well. I'll try tomorrow!
 
3:11 PM
I like the fact that the guy was nice enough to comment '%the formula' at the end of his two pages long formula : stackoverflow.com/questions/72364969/matlab-formula-input
 
very useful comment hehehe
 
@Adriaan I don't remember what the exact syntax is, but it just creates a struct for you, so you could create that struct manually as well using your two cell arrays.
@BillBokeey That certainly helps in answering the question...
 
Good. I've left it with a caveat for the time being, I'll check in MATLAB tomorrow when I'm back in the office
 
@BillBokeey did you end up getting your PhD? not sure how updated your profile is
 
@AnderBiguri Oh yeah I need to update that! Yes I got it in Sept. 2019! Then I worked a bit in the industry, and now I'm back into research (hence the time to procrastinate here ^^)
What about you?
 
3:16 PM
Yeah, got mine in 2018, but have not escaped academia
I HAVE BEEN TRAPPED
SEND HELP
actually working around applied mathematicians now hehe
one they they will realize that when I say "applied" it means something different to what they mean
 
Ohhh so the trap is in more than 3 dimensions now
you're fuked
2
 
hahahaha
 
@Adriaan This works:
s=struct('type',{'.', '.', '.', '()', '.'}, 'subs',{'a', 'b', 'c', {2}, 'field1'})
data=subsasgn(data,s,1)
The subs value for the '()' indexing must be a cell array, apparently.
@Adriaan I updated your code with tested code, I hope you don't mind. I did the work, might as well have it on there. :)
 
 
2 hours later…
5:33 PM
@BillBokeey congrats, and RIP
 
 
2 hours later…
7:30 PM
Do we have any experts here on danish dough whisks?
I've seen three varieties, basically with one, two or three "eyes". Is there really a noticeable difference?
Where are the scientists when you need them?
 
hehehe
 
Multiocular O (ꙮ) is an exotic glyph variant of the Cyrillic letter O. This glyph variant can be found in a single 15th century manuscript, in the Old Church Slavonic phrase "серафими мн҄оꙮ҄читїи҄" (serafimi mnogoočitii, "many-eyed seraphim"). It was documented by Yefim Karsky from a copy of the book of Psalms from around 1429, now found in the collection of the Trinity Lavra of St. Sergius. It was proposed for inclusion into Unicode in 2007 and incorporated as character U+A66E in Unicode version 5.1 (2008). In Unicode 15.0, it will have 10 eyes instead of 7. == See also == O (Cyrillic), ...
> In Unicode 15.0, it will have 10 eyes instead of 7.
 
 
7:48 PM
and because it appeared in a single manuscript they make an unicode symbol out of it?
I sure hope my handwriting never results in new unicode characters!
 
it was too cool to pass up
 

« first day (2519 days earlier)      last day (694 days later) »