Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

11-02-2016 , 10:20 PM
I have a 5 year old github repo with custom sublime tab completion snippets that I've cloned 50+ times.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2016 , 10:41 PM
Quote:
Originally Posted by RogerKwok
esh no IDE for js in 2016? do you type out your imports you pleb
what IDE does this for you?

asking for a friend. I only use vim.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2016 , 11:20 PM
Quote:
Originally Posted by Ryanb9
need some quick help. im using juypter (iPython) and i have text file that i used re to split into words, they are all in a list now. i need to come up with a data frame (i guess?) where it has each word and the corresponding frequency. thing is i cant use iteration. i can use numpy or pandas to do iteration for me, but i cant do iteration myself.

im thinking about using "apply" but wtf i have no idea what im doing... i hate python. i suck at it. any ideas? lol
I spent literally like 2 seconds on google and found this, seems like it would work
http://stackoverflow.com/questions/2...taframe-column
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2016 , 11:28 PM
Quote:
Originally Posted by Prickly Pear
what IDE does this for you?

asking for a friend. I only use vim.
Probably all of them. Pycharms does this for python (and a whole lot more)

I was an emacs only guy until I tried pycharm. It has a (not very good) emacs mode which is mostly good enough, and a whole raft of extremely useful features. Stuff like "open the file that has this symbol in it and take me to it's definition" or "run this function as a unit test" or an *extremely* good symbol and file search mechanism.

It's refactoring tools are even pretty good, although I don't use them that much. It's python unit test integration is superb. It's error detection is great - I literally never have syntax errors any more, or mispelled variables, missing commas or parenthesis, etc, because it detects all those in real time.

It also detects pep8 errors (linting basically I guess). I turned off most of the pedantic ones but basically it keeps me from making mistakes in that fashion, which is nice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-03-2016 , 12:11 AM
Quote:
Originally Posted by RustyBrooks
I spent literally like 2 seconds on google and found this, seems like it would work
http://stackoverflow.com/questions/2...taframe-column
page not found
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-03-2016 , 03:54 AM
anyone here use BEM or any of the other CSS masterpieces of overengineering "modular frameworks"?

if so, can you provide a simple example of a situation that they handle more gracefully than ordinary semantic class names and CSS styles targeted using the relationships among those semantic elements?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-03-2016 , 08:02 AM
Quote:
Originally Posted by Ryanb9
page not found
Bad paste. But then I spent 2 seconds on google and found it again.

http://stackoverflow.com/questions/2...taframe-column

Can I recommend you put like... any effort into this at all? I am not exaggerating when I said I spent 2 seconds on google.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-03-2016 , 11:54 PM
Quote:
Originally Posted by Prickly Pear
what IDE does this for you?

asking for a friend. I only use vim.
i'm using intelliJ idea, similar to pycharm rusty mentioned.

of course i assume you're doing es6 module imports w/ webpack and not ghetto requirejs or something

also there's a vim plugin w/ intelliJ that's worked out great so you can stick w/ old bindings, but you just gotta hit esc a lot (or i hear cool kids rebound that to jj)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-04-2016 , 06:14 AM
Quote:
Originally Posted by RogerKwok
i'm using intelliJ idea, similar to pycharm rusty mentioned.

of course i assume you're doing es6 module imports w/ webpack and not ghetto requirejs or something

also there's a vim plugin w/ intelliJ that's worked out great so you can stick w/ old bindings, but you just gotta hit esc a lot (or i hear cool kids rebound that to jj)
Nah, the cool kids rebind esc and ctrl to caps-lock (esc if you press/release, ctrl if you hold).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-04-2016 , 06:19 AM
Quote:
Originally Posted by Wolfram
Nah, the cool kids rebind esc and ctrl to caps-lock (esc if you press/release, ctrl if you hold).
i've had caps-lock bound to ctrl for a while, but how, good sir, do you make it do different things depending on hold vs press/release? i'm on mac...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-04-2016 , 09:43 AM
I'm on linux so i put this in my .zshrc:
Code:
setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Caps_Lock=Escape;Control_L=Escape;Control_R=Escape'
Maybe this works for mac:
http://apple.stackexchange.com/quest...pe-and-control
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-04-2016 , 11:58 AM
Quote:
Originally Posted by gaming_mouse
i've had caps-lock bound to ctrl for a while, but how, good sir, do you make it do different things depending on hold vs press/release? i'm on mac...
Caps lock bound to forward delete (mac) has changed my life.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-04-2016 , 05:14 PM
But vim has "d" for forward delete. There is dd for whole line, dw for word, d + idk for letter.

I don't actually use C-d for deletion in emacs, though I use C-k for delete line a lot.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-05-2016 , 10:34 AM
This one was fun too:
https://codefights.com/challenge/gmYZRfrxWt6Ka7gYo

Spoiler:
static int onlySurviver(int p){
return 1+2*(p^Integer.highestOneBit(p));
}
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-05-2016 , 02:16 PM
Quote:
Originally Posted by plexiq
Spoiler:
https://en.wikipedia.org/wiki/Josephus_problem

I wonder if any job would actually use this as an interview question expecting someone to know this. I know it's in knuth's concrete mathematics and read that chapter but no way I could reproduce it.

I guess it's pretty easily solvable without the math trick though.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-05-2016 , 04:04 PM
Didn't know about the math trick actually, I just wrote a recursive version first and then optimized from there. As an interview question I think you can only reasonably expect some O(log(n)) solution.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-07-2016 , 12:29 PM
spend $30 buying an .io domain only to misspell it on the order and spend an hour trying to debug nginx achievement unlocked.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-07-2016 , 04:21 PM
Gotta love eslint, I make a while loop with a settimeout in it that affects the while, it tells me not to make functions in a loop, I move the function out of the settimeout, it tells me the variable compared in the while is not modified in the while.

..wait a minute, what I'm doing is idiotic and the whole reason for setinterval in the place. Good talk.

Last edited by Grue; 11-07-2016 at 04:27 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-08-2016 , 02:49 AM
Need a quick check from you guys. I'm about to make this post on the class's forum (its piazza, basically a forum like 2+2 but the only memebers on it are people that are in the class you are taking at a university).

I've never made a post like this where it basically calls-out the professor so I want to make sure it's not over the top or let me know if im out of line:

edit: the first project was creating a Deterministic Finite Automata in java. The second project that we are doing now is a Non-Deterministic Finite Automata-->DFA (the algorithm for converting from NFA to a DFA). In p1, I got 107/100 instead of 110/100 b/c I didn't use Java's Set<etc> name HashSet<etc>(); data structure.

Quote:
What is really frustrating is that the implementation of a DFA that we are given allows for duplicates. In the implementation of a DFA that I created for project 1, if you tried:


dfa.addState("1");

dfa.addState("1");

dfa.addState("1");


The second and third calls would do nothing because a set is not meant to contain more than one item of the same name. The DFA that we are given (because the one we made for p1 was apparently not up to par) allows for duplicates, which means I have to keep track of what state I have added to the DFA because if I add it again it will gladly accept it.


What really irritates me about this project is that I lost 3 points on part 1 because I did not use Java's Set data structure, and that in part 2 I am given an implementation of a DFA that does use Java's Set data structure and I wish that it was not given to me.


I lost points for not creating something that, in my opinion, is worse than the thing I actually created. I have spent the last 4 hours trying to work around the current problem that I have which is making sure that I don't add the same state to the DFA twice and I think I'm coming to the conclusion that it will be easier if I just import my own implementation of a DFA and convert the NFA to my own DFA, and then transfer my own DFA to the DFA provided for this project. Imo, when a student comes to a conclusion like this (assuming it is a justified conclusion), then something is in need of improvement.
edit: so far this post has 50 views and no replies. Since no one has said "dont post it" I guess I'll go ahead and do it. We will see what comes ... hopefully she doesn't fail me

Last edited by Ryanb9; 11-08-2016 at 03:01 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-08-2016 , 04:08 AM
Yikes. You seem kind of dumb and very petulant.

1) The class forum is not the appropriate place to complain about how your project was graded. And you're bitching when you got 107/100?

2) "(because the one we made for p1 was apparently not up to par)", jesus dude. It seems really standard to provide a DFA implementation for the second project - if you ****ed up the first project it shouldn't carry over and mean you're screwed for all later projects too.

3) Did you seek clarification as to why the professor chose to use a set data structure before going on your rant? From what I can tell you are wrong and using a set makes perfect sense - a java set cannot contain duplicate elements, so you don't need any extra code to avoid adding states multiple times.

Last edited by n00b590; 11-08-2016 at 04:27 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-08-2016 , 04:51 AM
Quote:
Originally Posted by n00b590
Yikes. You seem kind of dumb and very petulant.

1) The class forum is not the appropriate place to complain about how your project was graded. And you're bitching when you got 107/100?

2) "(because the one we made for p1 was apparently not up to par)", jesus dude. It seems really standard to provide a DFA implementation for the second project - if you ****ed up the first project it shouldn't carry over and mean you're screwed for all later projects too.

3) Did you seek clarification as to why the professor chose to use a set data structure before going on your rant? From what I can tell you are wrong and using a set makes perfect sense - a java set cannot contain duplicate elements, so you don't need any extra code to avoid adding states multiple times.
The quoted was the post. It has no mention about grades. The not up to par was mentioned by the professor in class. She said something like "your dfas were not good enough so ill give u mine for part 2"

And ****, i already posted >.<

Also, java sets do allow duplicate DFAState objects (a class we created) if they ahve the same name but not the same actual object.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-08-2016 , 04:56 AM
^ Then you are not using the set correctly, make sure your DFAState class implements compare (TreeSet) or hashCode/equals (HashSet) correctly.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-08-2016 , 06:43 AM
Any of you guys watch any of the handmade hero series? Thoughts?

I'm a couple weeks worth of episodes in and loving it / his style of coding.

Last edited by SiQ; 11-08-2016 at 07:00 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-08-2016 , 04:57 PM
By strange coincidence, a video on the Josephus Problem was released by Numberphile about a week ago:



The explanation is very good, and I like how to added the binary justification at the end.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-09-2016 , 11:54 PM
very nice explanation
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m