Treechopper
Member
Of course there's assembly. Thanks for giving such a detailed response again!*help*
Of course there's assembly. Thanks for giving such a detailed response again!*help*
Is that the normal convention for Objects? Capitalizing them to differentiate them from variables?
Is that the normal convention for Objects? Capitalizing them to differentiate them from variables?
Swift is now open source!
We are excited by this new chapter in the story of Swift. After Apple unveiled the Swift programming language, it quickly became one of the fastest growing languages in history. Swift makes it easy to write software that is incredibly fast and safe by design. Now that Swift is open source, you can help make the best general purpose programming language available everywhere.
For students, learning Swift has been a great introduction to modern programming concepts and best practices. And because it is now open, their Swift skills will be able to be applied to an even broader range of platforms, from mobile devices to the desktop to the cloud.
Welcome to the Swift community. Together we are working to build a better programming language for everyone.
The Swift Team
I guess in js capitalization is mandatory, but in most other languages it's a convention.
Usually classes are first letter uppercase (Pascal), variables have lowercase then upper case (likeThis), constants are in caps (LIKE_THIS). Rules and conventions change depending on the language though.
Yeah, I immediately moved to F# from Haskell. I'll get around to Python eventually but I can't imagine working without strong static typing.After messing around with Haskell for a few weeks its amazing how easy Python is to work with. :lol
And its given me a newfound appeciation for the quality of the Python ecosystem. I love functional programming and F# is probably my favourite language, but Python has so many libraries for whatever problem you can think off its kinda hard not to use it. F# at least has the .Net world to tap into, but Haskell lacks too much stuff. Still a great language to help you understand functional programming though.
I do miss my typesystem when working with Python, it just feels right to have the compiler yell at me for doing stupid shit like trying to return a string when i should return an int.
Works for me. I have Pro 2015.I've run into a weird issue with Visual Studio 2015 (community edition): if i want to select multiple lines i want to use shift + arrow keys, like i do in Word and Notepad and well, any other editor. But this doesnt work in (my version of) VS2015? Is this the expected behaviour and im simply missing some other shortcut to do this?
Userbase is small. I started using it two months ago. I was a longtime C# stalwart but it is now my favorite language. I can go into more detail about it if you want.I've heard more talk here of F# than anywhere else. Is this the sleeper language or do I need to get out more?
I've heard more talk here of F# than anywhere else. Is this the sleeper language or do I need to get out more?
That's one of the main things (maybe the main one) that makes me reluctant from doing large projects in Python...I'll get around to Python eventually but I can't imagine working without strong static typing.
I actually haven't spent much time in a dynamically typed language. If I were to learn Python, it would be to see what that's like. I disliked my brief exposure to dynamic typing in Javascript.That's one of the main things (maybe the main one) that makes me reluctant from doing large projects in Python...
But if you're totally against dynamic typing (since it's already strong in Python), you can always try the Cython superset. At the beginning, it feels a bit like a hack (Cython is a kind of Python extension that allow compilation of the code, but to get better performance, you can specify types associated to names), but it's interesting in that you can choose whether (and when) using static typing.
That being said, the Python standard / common modules are really handy and plentiful, even if it's a bit of a mess sometimes. I often think about Python as a swiss army knife.
Userbase is small. I started using it two months ago. I was a longtime C# stalwart but it is now my favorite language. I can go into more detail about it if you want.
It's been growing recently in general with Microsoft official support of Ximarian and Mono. Haskell has always struggled with purity, and OCaml is just relatively small in general and lacking some library depth despite being easier to work with. However F# has all of .Net behind it. I've seen talk elsewhere too. I think languages like Scala, Clojure, Swift, and Rust have all convince people to take a look adding functional touches to programming, and F# is starting to make it's rounds in mindshare.
Are you familiar with functional programming? It is in the ML family and has interop with C#.Is it basically a functional (programming paradigm) C#? .NET backing only makes it sweeter.I'm studying now so I'm trying to not look it up...
Are you familiar with functional programming? It is in the ML family and has interop with C#.
It's very similar to Haskell but with object oriented features. It's the inverse of C#I've taken a programming languages class wherein we did several assignments in Haskell. It was great, but I wished we would have spent more time in it
What is the "professional" way to handle multiple offers?
I have an offer from a mid-sized company in Boston that expires on the 9th, but I also have an interview on the 9th from a very large, Palo Alto company.
If you accept the Boston offer, consider your chances with the Palo Alto company over. Do not accept it, then wait to find out what happens with the Palo Alto company, then change your mind with the Boston people.
You can try to stall the Boston company and ask for a little more time, but they're not obligated to give it to you. You can also explain to someone from HR at the Palo Alto company your situation and hope they will bump your interview a little sooner and give you a 24 hour turnaround time on the decision.
In the end though, sometimes you have to make hard choices. Accept the safe bet and throw away the chance at that other company you really want to work at, or throw away the safe bet and risk ending up with neither.
Well, if you think you're going to back out, I definitely wouldn't SIGN anything with them.Are there legal implications that would be possible if I accepted an offer and then backed out on it?
It would be an asshole thing to do, and I'm not saying I would, but I need to know all of my options before making this decision.
Well, if you think you're going to back out, I definitely wouldn't SIGN anything with them.
It's very similar to Haskell but with object oriented features. It's the inverse of C#
C# -> OO language with fun features
F# -> fun language with OO features
Are there legal implications that would be possible if I accepted an offer and then backed out on it?
It would be an asshole thing to do, and I'm not saying I would, but I need to know all of my options before making this decision.
I'm not sure.
Frankly I wouldn't do it simply out of professional integrity. And i say that as someone who's done it before, when i was young and stupid and didn't know better.
If the Boston company wants you bad enough, they should extend the offer for a few days. The palo alto company should be able to give you fast turnaround time if you explain the situation.
Don't change your mind after signing anything. That's my advice.
int my_strlen(char s []){
int length = 0;
int i = 0;
while(s[i] != '\0')
{
length++;
i++;
}
return length;
}
int my_strcpy(char s [], char t []){
int len1 = my_strlen(s);
int len2 = my_strlen(t);
int i = 0;
if ((len1 > len2) || (len1 = len2)){
while (t[i] != '\0')
{
s[i] = t[i];
i++;
}
s[i] = t[i];
printf("%s", s[i+1]);
return 1;
}
if (len1 < len2)
{
return -1;
}
}
....
....
int lena = my_strlen(str1);
int lenb = my_strlen(str2);
printf("\n Length of String1 is %d, and length of String2 is %d.", lena, lenb);
printf("\n The original String1 is %s.", str1);
int rx;
rx = my_strcpy(str1, str2);
if (rx == 1)
{
printf("\n The mixture was successful %d.", rx);
printf("\n The mixture of String1 and 2 is %s.", str1);
}
else
{
printf("\n The two strings cannot mix. String1 is shorter than String2. %d.", rx);
}
This line:Hey guys, any idea why I maybe getting Segmentation Fault in this C code in Pico?
Context: The code will run up to the point where it shows the length of String1 and String2 and it is always correct in my attempts. However after that, it get's a Segmentation Fault in the: "rx = my_strcpy(str1, str2)".
Weird thing is. It used to run, but would seemingly always believe that String1 is larger than String2, even when it wasn't the case. Now I just get a Segmentation Fault. Though even when it did that, it would also work incorrect. The idea of "my_strcpy" is that... Say you have "Hello" and "Bye".
The answer should come out to be: "Bye\0o." Yet in all scenarios, "Bye" would simply replace "Hello." Like somehow it always cuts off the rest.
Any ideas? The rest of the code I left out runs perfect.
if ((len1 > len2) || (len1 = len2)){
if (len1 >= len2){
I'd say it's nothing like Javascript. I don't enjoy Javascript at all myself.I actually haven't spent much time in a dynamically typed language. If I were to learn Python, it would be to see what that's like. I disliked my brief exposure to dynamic typing in Javascript.
I'd say you don't come to Python because of the language, but because of the available modules and the whole ecosystem.It might be a while, because F#'s type inference seems like the best of both worlds.
Goodness, is the kernel next?!MS will open-source Chakra: https://blogs.windows.com/msedgedev/2015/12/05/open-source-chakra-core/
I wonder if Edge is next.
Thanks. I appreciate the advice. I'll hold off on signing anything until I make a full decision. The Boston company may give and extension for the offer, and I'll explain the situation to the Palo Alto company and ask for a quicker decision.
Goodness, is the kernel next?!
https://www.visualstudio.com/en-us/products/visual-studio-dev-essentials-vs.aspx
free 6 months of Pluralsight for having a (free) microsoft account.
I'll also add that you might get a better offer from the Palo Alto company if you tell their HR about the offer you were given, along with all of its terms.
Very strong might, there. Especially if it's the one that I'm thinking of.
Well when they originally asked if I had any other pending offers or interviews I said "yes, expiring on the 9th". So I was a bit surprised when they scheduled the interview on the same day.
This line:
In the second part you are assigning len1 = len2, not checking if they are equal. This evaluates to True.Code:if ((len1 > len2) || (len1 = len2)){
I'd suggest using the greater-or-equal-to operator instead:
Code:if (len1 >= len2){
I actually used to have that the ">=" but I still kept getting segmentation fault.
The segmentation fault looks to be coming from the copy function where you're trying to print the i+1st character of the array when i+1 is beyond the bounds of the array.
s[i] = t[i];
return 1;
Oh. I forgot to remove that... Wonder if it will fix it. Yet I worry that even with that no longer giving me an error. Somehow rx will always be 1, even if len1 is less than len2.
I'll try it out and edit this post.
Edit: Yup. Even when Len1 is less than len2, it always somehow satisfies the condition of (len1 >= len2).
It would be one thing if the getting length equation was wrong... But the output for the length of both strings is correct. But regardless it still does the combination incorrect. Somehow it's simply changing: "Hello" to "Bye" instead of "Bye\0o" Which is replacing the first 4 characters of Hello with Bye and the '\0' which is the enter key.
Edit2: Fixed the length problem. Whoops, forgot to add the second '='. Still the combination is still wrong.
Edit3: Okay- okay. So. I'm unsure if there is even a way to fix this... But this part:
Code:s[i] = t[i]; return 1;
Which comes after replacing string1 parts with string2, is causing the rest of string1 to vanish because of the '\0'.
If I remove that line and use the same examples of "Hello" and "Bye". I get "Byelo". If I add the line, I get: "Bye."
Edit: Yup. Even when Len1 is less than len2, it always somehow satisfies the condition of (len1 >= len2).