« first day (1262 days earlier)      last day (3231 days later) » 

amr
2:03 AM
@Conrad what i do with those big files is read them in and write them back out into an .mx file, which in turn is much quicker to read back in the next time. i coulda sworn there was a simple way of partially reading CSVs though but i can't seem to find the QA. maybe it was one of those stream approaches.
 
2:19 AM
@Conrad Read it once, turn it into a DataSet consisting of Association's with proper naming (probably exclude what you will never use) and export it as mx as suggested by @amr. You will love how you can work with the data.
 
 
3 hours later…
5:46 AM
"…80 of the 100 functions…" - dammit @hal, stop giving them ideas! :P
 
 
3 hours later…
8:55 AM
Actually I'm curious: which of the new-in-10.1 do people here actually use?
I use almost none of them, with the exception of a few list-manipulation functions. There are various reasons for that ranging from "cool but not useful", too cloud oriented (which I don't think is that useful for the majority of users in academia), simply not the area I need (I guess the time series stuff is good). Built-in data access has rarely been of practical use for me ... except for some rare mapping stuff.
The bugfixes on the other hand were very very welcome. I'd never go back to 10.0. Unfortunately they turned out not to be sufficient so I'm eager to try out 10.2 ...
10.0 on the other hand did have a ton of very useful stuff, Association being the big one. It's just that the quality left a lot to be desired.
 
9:11 AM
@Szabolcs Were "curried" forms already in 10.0? Or Composition operator form?
I'd say I use core language improvements (none of which are actually something you couldn't do yourself, but better be standardized) and dimension reduction, in addition to some new helper functions like AbsArg...
I'd say 10.0 geometric regions made lots of things much easier, but sadly it has limitations, performance-wise.
 
9:27 AM
@kirma Yes, they were.
@kirma I use that too, I hope it'll be improved.
 
9:59 AM
@Szabolcs I think CirclePoints is very a useful. I also like the new Arduino connectivity. And I know one person who used WordCloud for a report he wrote. I had to point him to the built in function because he hadn't even considered there might be one, but he was glad there was one. The OpenSSL interface can be useful in theory; I was hoping I might use it to authenticate with e.g. Google via OAuth, which is possible with OpenSSL but not yet through the built-ins unfortunately, it seems.
 
@Pickett I didn't know about CirclePoints. Yes, that's useful, I did that manually several times last week.
 
10:11 AM
@Szabolcs Just recalled AnglePath too. Also quite useful.
 
10:22 AM
Oh, and I also use AbsArg and MinMax now when I need that. That was also new in 10.1.
 
@Szabolcs I already had kind of associations which where a special head with a list of rules inside and some syntactical sugar to make queries easily. Lately, I used the Dataset/Association combination for the first time in a larger real-live situation when I converted a big EggCell-File of a colleague to something handy. I really like it.
So yes, things like Association are awesome and I'm glad we have people like @Leonid or Taliesin that often point to the important things and explain how some things work.
@Pickett About all the syntactic sugar, I'm not so sure. On the other hand, I have written about a million times {Min[#],Max[#]}& and AnglePath was just awesome for the collatz-visualization. All of those can be written very easily but have it standardized and built-in is probably the better way.
What is annoying is that most features are half-baken when they are published. Additionally, introducing so many new bug with minor-updates is a no-go for such a large company. Especially when you want money for the updates.
 
11:08 AM
@Guesswhoitis. :D
 
12:05 PM
@halirutan If you work a lot with Dataset and associations, beware: if you have an association where some values are packed arrays, and you try to map a function over it, it won't work. I'm not that surprised, all the possible combinations of datastructures that must all look the same to the user and some functions are hard to get right. Map is just map regardless of what combination you have of associations, lists, packed arrays, sparse arrays, StructuredArrays, and who knows what else.
 
12:50 PM
@Szabolcs I had already seen your message about this issue, but thanks for the reminder.
 
0
Q: Reaching 40-Vote Limit Closes Some Queues, Not Others

bbgodfreyToday, I used all forty of my allotted votes and then found that the First Posts and Late Answers queues were closed to me for the rest of the day. Why these two and not the other four?

 
1:42 PM
@Szabolcs I've used MinMax, TakeLargestBy, WikipediaData, StringRiffle, WordCounts, CharacterCounts, AngleVector, AnglePath. Forgot to use SequencePosition, StringStartsQ. Concerned that grammar functionality was cloud only and that perhaps they are adding too many new functions instead of expanding existing functions with appropriate options and meta-algorithms.
 
1:57 PM
Amazing post:
DeepCube, a Generalized 3D Cube Puzzle
 
2:30 PM
@VitaliyKaurov Wow, I would guess that puzzle is extremely difficult. I notice the author didn't mention that he had actually solved an instance, heh. Do you have a sense for how much internal momentum there is for synchronizing CDF player releases with language updates vs expanding the HTML/Javascript deployment functionality? CDF updates are easier, but reach a smaller audience.
 
 
2 hours later…
4:26 PM
How can I get Mathematica to simplify

func[True] := True
func[False] := False
Xor[func[x], func[Not[x]]]
to True, given that it is True for x == True and for x == False (a tautology)?
 
4:37 PM
@user1667423
f[x_] := x
Simplify@Xor[f@x, f@Not@x]
 
Can that be done without f[x_]:=x?
The problem is that I'll be specifying the inputs and outputs manually for the real function I'm testing
i.e. enumerating the results of all possible Boolean inputs
 
@user1667423 If you constrained x to booleans and Mathematica had a fancy type inference system then such functionality could be added. In your example though, the definitions of func are never being examined because x isn't exactly True or False.
I would take your collection of manually specified inputs and outputs, and write a function to compress those into one definition and use that in the simplify expressions.
 
Hmm, writing a function to do that might be a bit complicated :-P
It has several arguments
Thanks for the help though.
Do you know of a program that could achieve this task?
 
@user1667423 Lol, if I had complicated boolean expression of several arguments I would just feed it to Simplify in Mathematica directly.
 
Hmm, Simplify and FullSimplify do take an assumptions argument
But it doesn't seem to be working
f[True] := True
f[False] := False
Simplify[Xor[f[x], f[Not[x]]], x == True]
FullSimplify[Xor[f[x], f[Not[x]]], x == True]
even letting x == True directly
 
4:50 PM
@user1667423 If you just say x=True then evaluate your Xor you don't even need to use Simplify.
 
Ah, I think the problem seems to be that x is interpreted as a Symbol and hence the assumption is not satisfied.
The problem with that approach is that it wouldn't generalize well to multiple arguments.
I would have to individually test every possible input expression, whereas I would like a symbolic result.
Is there a way to tell Mathematica "This symbol represents a Boolean?"
 
@user1667423 Element[x,Booleans] is typically used for Simplify.
 
You're right
Still doesn't seem to work though
 
@user1667423 Yes, because your function doesn't apply to symbols, only specific True or False.
 
Would expressing it with a symbolic input and a big switch expression work?
i.e. f[x_Boolean]:=Switch[x,True,True,False,False]
I'll try it
Still doesn't work
f[x_Boolean] := Switch[x, True, True, False, False]
Xor[f[x], f[Not[x]]]
FullSimplify[%, Element[x, Booleans]]
 
5:01 PM
@user1667423 I don't understand why you aren't just doing something like Simplify[((a || b) && (! b && c)) || c]
 
Well, here's an example of a function I'm working with
f[True, True, True] := False
f[True, True, False] := True
f[True, False, True] := True
f[True, False, False] := False
f[False, True, True] := True
f[False, True, False] := True
f[False, False, True] := True
f[False, False, False] := False
Is there a way in Mathematica to programmatically simplify that?
 
@user1667423 Simplify[(a && b && ! c) || (a && ! b && c) || (! a && b &&
c) || (! a && b && ! c) || (! a && ! b && c)]
 
Derp, of course
Just a sum of products expression
Thanks!
 
5:31 PM
BooleanTable[], BooleanFunction[] and BooleanConvert[] may be of interest.
In particular, you want BooleanFunction[110, 3].
 
5:54 PM
@Guesswhoitis. Neat! Boole is another one that I'd seen but hadn't been promoted to my active vocabulary.
 
If you're wondering where the "110" came from: notice that if you change the booleans to binary digits in his definition of f, you have the numbers from 7 to 1 ordered downward on the left-hand side.
So the entire thing is nicely sorted. You now find the binary number whose digits are the ones on the right-hand side. So, in this case: 01101110.
Of course, you can now use BooleanConvert[] to see e.g. the corresponding conjunctive or disjunctive normal forms.
…and about Boole[]: I fell in love with Iverson brackets thanks to Knuth.
 
6:12 PM
@Guesswhoitis. Wolfram's book was the first exposure I had to such function numbering systems. Cellular automaton rule 30, 110, etc. Boole certainly beats /.{True->1,False->0} which I used as recently as last week. I'm heading to Charleston for the weekend, so I'll be phone only until Sunday.
 
@Guesswhoitis. You caught me :-)
 
Caught, how? :)
 
I was testing rule 110 for cellular automata (the universal one)
 
Ah, hence the 110… :) for all its faults, Mathematica has pretty good consistency. :)
So, to answer your original question: just build the BooleanFunction[] directly from its truth table. You should now be able to use it with other functions.
TautologyQ[] is also helpful in this regard.
 
7:20 PM
Is there a quick way to access the nth element of a sequence?
Without converting it to a list first
I'm trying to programmatically get the nth argument of a pure function
but #n doesn't seem to work if n has to be specified programmatically (not hard-coded)
 
7:39 PM
Slot
 
 
2 hours later…
9:56 PM
Yeah that works
Is there a way for general sequences though?
also its length
 

« first day (1262 days earlier)      last day (3231 days later) »