Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 10-27-2017, 07:44 AM   #30351
Wolfram
Carpal \'Tunnel
 
Wolfram's Avatar
 
Join Date: Jan 2006
Location: You can be my wingman any time
Posts: 14,472
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by saw7988 View Post
Does it bother anyone else that languages can't agree upon an abbreviation for "function"? There's function, func, fun, and fn. You could even throw Python's "def" in there, but even without that we're memorizing 4 different variations of the word function.
Quote:
Originally Posted by RustyBrooks View Post
Tcl uses "proc"
Lisp uses "defun"

I've probably seen some others
Quote:
Originally Posted by candybar View Post
People can't agree on anything in general - if they did, we wouldn't have all these different languages.
https://en.wikipedia.org/wiki/Endang...guages_Project
Wolfram is offline   Reply With Quote
Old 10-27-2017, 01:00 PM   #30352
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by RustyBrooks View Post
Tcl uses "proc"
Lisp uses "defun"

I've probably seen some others
Lisp does not use defun. The real format is something like this:

Code:
(def do-stuff
   (lamdba [arg] ))
Or in Clojure:

Code:
(def do-stuff
   (fn [arg] ))
which collapses to a portmanteau of def and fn:

Code:
(defn do-stuff [arg] )
Defun, defn, and so on, aren't function identifiers, but macros that place the result of a procedure into a value, or, syntactic sugar over the idea of x1 = function (x).
daveT is offline   Reply With Quote
Old 10-27-2017, 01:48 PM   #30353
goofyballer
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 60,555
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

No, I have no side code projects to show you

A nice short essay about coding as a profession and not an obsession

edit: also from weekly Hacker Newsletter perusal, hilarious take-home interview project from a startup

Quote:
I replied, asking if it was a paid position and the deadline for the project. They replied with the following: "Happy to clarify. This position is paid after a 3 month training. This is non-negotiable and keeps us from hiring engineers that end up being toxic to our long term goals and just looking for a pay day. As for the project, you will have one week from today. We wish you the best of luck and hope to have you on our team within the month!"
LOL
goofyballer is offline   Reply With Quote
Old 10-27-2017, 04:49 PM   #30354
Larry Legend
Celtic Pride
 
Larry Legend's Avatar
 
Join Date: Jul 2009
Location: Kyrie's earth
Posts: 41,383
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

It gets better, they claim to have a world-class react expert and the only technical person on staff (CTO, who they were surely referring to) graduates in the spring.

They are all like 20-21 years old and a bunch of wanna-be people who arguably won by getting any publicity for their ****-tier company at all.
Larry Legend is offline   Reply With Quote
Old 10-27-2017, 05:12 PM   #30355
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Someone posted this:

Quote:
From their "CEO"s LinkedIn:

Founder

A Suit of Gold

Aug 2015 – May 2016 10 mos

• Increased profit margin by contracting labor in Vietnam
daveT is offline   Reply With Quote
Old 10-27-2017, 05:21 PM   #30356
Larry Legend
Celtic Pride
 
Larry Legend's Avatar
 
Join Date: Jul 2009
Location: Kyrie's earth
Posts: 41,383
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Yea their linkedins are easy to find
Larry Legend is offline   Reply With Quote
Old 10-27-2017, 08:56 PM   #30357
goofyballer
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 60,555
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Another go question, this time related to cgo and linking, which I haven't been able to find a ton of info about on the internets.

So, say that I'm writing C++ and I want to make a static library. My static library might call outside functions that aren't included in it and will be linked in later, but that's fine, because static libraries aren't linked.

mylib.cpp:
Code:
void funcDefinedElsewhere();

void myLibFunc() {
  funcDefinedElsewhere();
}
Code:
$ clang -c mylib.cpp
$ ar -r libmylib.a mylib.o
Tada, I have libmylib.a. If I try to link it into a shared library or executable that doesn't define funcDefinedElsewhere(), there will be a linker error, but that's the behavior I'm looking for here.

Now, what if I want to do the same thing with Go and build modes?

Code:
package main

// #include "test.h"
import "C"

func goFunc() {
	C.myFunc()
}

func main() {}
Whoops, can't do that:

Code:
$ go build -buildmode=c-archive
Undefined symbols for architecture x86_64:
  "_myFunc", referenced from:
      __cgo_c45d7460d1f4_Cfunc_myFunc in test.cgo2.o
     (maybe you meant: __cgo_c45d7460d1f4_Cfunc_myFunc)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Okay, so Go will always try to link calls into C code. What if I add a .c file that defines the function Go is trying to call (myFunc), and the C code makes a call to an external library that will be linked in later on?

Nope:

Code:
$ go build -buildmode=c-archive
Undefined symbols for architecture x86_64:
  "_externalFunc", referenced from:
      _myFunc in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there any way to do this? Why does Go insist on everything being linked in static libraries?
goofyballer is offline   Reply With Quote
Old 10-27-2017, 09:51 PM   #30358
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,252
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I'm a total go dilettante but in your first example, you supplied the call declaration for your externally linked function. Another way to do that in C or C++ is to use the header files that come with a dynamically linked library. In your Go example, you didn't. How is it supposed to know the call signature for the function?

I've never done it in go, but here's something I found via googling. It looks pretty ****ing ugly.

https://www.goinggo.net/2013/08/usin...-programs.html
RustyBrooks is offline   Reply With Quote
Old 10-27-2017, 10:41 PM   #30359
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 58,056
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Larry Legend View Post
It gets better, they claim to have a world-class react expert and the only technical person on staff (CTO, who they were surely referring to) graduates in the spring.

They are all like 20-21 years old and a bunch of wanna-be people who arguably won by getting any publicity for their ****-tier company at all.
it gets way better. the take home assignment was actually free work for the company. it was literaly their product.

https://www.crunchbase.com/organizat...chnologies-inc

Quote:
Bee Technologies Inc.
A photo sharing platform to connect with brands.
and from the OP, assignment details:

Quote:
Here, the front-end would like to send a JSON encoded API request to your server in order to upload a photo to the site. It is on you to create an endpoint that can handle this upload, then find a way to view all the photos that have been uploaded to the site in an efficient manner
right but ya, ofc dude will need 3 months to learn the tech stack that he just wrote.
Victor is offline   Reply With Quote
Old 10-27-2017, 11:55 PM   #30360
goofyballer
 
goofyballer's Avatar
 
Join Date: Jun 2005
Posts: 60,555
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by RustyBrooks View Post
I'm a total go dilettante but in your first example, you supplied the call declaration for your externally linked function. Another way to do that in C or C++ is to use the header files that come with a dynamically linked library. In your Go example, you didn't.
Heh, welcome to the wonderful world of cgo:

Code:
// #include "test.h"
import "C"
That "comment" is actually a directive for the cgo compiler. It includes the header with the function declaration. Otherwise it's a compile failure (whereas I got a linker failure).
goofyballer is offline   Reply With Quote
Old 10-28-2017, 11:26 AM   #30361
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,252
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Yeah I see that now looking at it. So I guess the deal here is that with go you never get just object code? If you tried the same thing in C with compiling and linking you'd get the same error. At some point you have to provide a library with the function at the link step.

That link I gave sort of gives an example of that. You can dynamically link stuff, I think, you just can't delay linking to some future time/place where the function will be defined?

I've only written pure go stuff, and really just toys. So I dunno.
RustyBrooks is offline   Reply With Quote
Old 10-28-2017, 11:37 AM   #30362
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,252
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Seeing that cgo stuff makes me feel a lot less bad for some stuff like this I've done.

I once had a C++ file that had a complex constant array in it. It had to be updated from time to time, it was generated from a relatively simple set of input. It was hard-coded just to save startup time for the program.

So I wrote an (emacs) lisp program that would produce the C++ array and included it in a comment in the file. You could execute the program from within emacs and it would replace the array with the new values.

Is that considered "self documenting?"
RustyBrooks is offline   Reply With Quote
Old 10-28-2017, 01:00 PM   #30363
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post
No, I have no side code projects to show you

A nice short essay about coding as a profession and not an obsession
I think the HN thread on this is fascinating. The top comment says "I'm a hiring manager and this is super important to me," followed by a 100 comments calling him out.

The other part that's fascinating is how people list other professions that don't require sitting at home and learning more. Nearly very profession they list is required, by law, to do X hours of paid and documented continuing education every year, lest they lose their license to practice their profession.
daveT is offline   Reply With Quote
Old 10-28-2017, 01:00 PM   #30364
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 58,056
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

anyone have experience with creating and customizing TEXT_MASK for Angular 2? I need to make one for dates.
Victor is offline   Reply With Quote
Old 10-28-2017, 01:35 PM   #30365
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,252
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by daveT View Post
I think the HN thread on this is fascinating. The top comment says "I'm a hiring manager and this is super important to me," followed by a 100 comments calling him out.

The other part that's fascinating is how people list other professions that don't require sitting at home and learning more. Nearly very profession they list is required, by law, to do X hours of paid and documented continuing education every year, lest they lose their license to practice their profession.
The old Google 1 day a week policy is possibly too much, but it would be better if companies gave some paid time for programmers to try new things, that were not expected to have immediate payoffs
RustyBrooks is offline   Reply With Quote
Old 10-28-2017, 02:02 PM   #30366
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I know I've talked about this here before, then was called crazy for making this claim, but I'd be surprised if 5 employers looked at my github account. Seeing others on HN express the same gave me a little bit of vindication.

I think I get it though. The vast majority of things on github are trashy one-page programs that don't really do anything. It's unusual to see a full-on project up there, which makes me wonder if having a github ends up being a negative indicator. Everything I have up is a full-on project, many with web links to see what the code does. Damned if you; damned if you don't, IMO.
daveT is offline   Reply With Quote
Old 10-28-2017, 06:19 PM   #30367
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,252
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I don't have a GitHub repo. I have a private repo that predates git, svn and maybe even CVS. It was seeded by my mentor and much of his code probably predated the popular notion of source control.

No one has ever asked to see my GitHub, but that wasn't a thing when I was junior.

But, I got my first job at a startup because someone saw the website I was working on. Granted, it was a much smaller ecosystem in those days.

My current job, I didn't "get" because of my code, but, I convinced them to let me show my projects in lieu of take home tests or hacker rank type stuff.

I have always had several side projects going. I used to discriminate on that basis. I really try not to now.
RustyBrooks is offline   Reply With Quote
Old 10-29-2017, 01:00 AM   #30368
Grue
Pooh-Bah
 
Grue's Avatar
 
Join Date: Mar 2004
Location: It is pitch black.
Posts: 5,003
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by goofyballer View Post

https://www.youtube.com/watch?v=uRf-sRZBiHo

excuse the weird mid 90s antisemitism but uh..

if you want to get hired at the "best" place, and you want the "best" job, and get paid the most and all that, FFS, make something that someone, somewhere, uses, and other people can look at it say "oh thats really cool, its 100% clear that bringing this person into our organization would be a huge asset". If you can't or don't want to do that, why are you entitled to being hired at the above?
Grue is offline   Reply With Quote
Old 10-29-2017, 02:05 AM   #30369
muttiah
Carpal \'Tunnel
 
muttiah's Avatar
 
Join Date: Aug 2004
Posts: 23,101
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Grue View Post
https://www.youtube.com/watch?v=uRf-sRZBiHo

excuse the weird mid 90s antisemitism but uh..

if you want to get hired at the "best" place, and you want the "best" job, and get paid the most and all that, FFS, make something that someone, somewhere, uses, and other people can look at it say "oh thats really cool, its 100% clear that bringing this person into our organization would be a huge asset". If you can't or don't want to do that, why are you entitled to being hired at the above?
Because side projects are pretty irrelevant and I'd guess that open source contributions impact like 1% of SE hiring decisions. It's like saying a prereq for working at a top company is working for free on cool/irrelevant/small scale side projects.

The discussion is a bit moot because it's the run of the mill unicorn startups that typically require side projects and open source because they "only hire the best". The big companies honestly don't care at all in my experience.
muttiah is online now   Reply With Quote
Old 10-29-2017, 10:58 AM   #30370
candybar
old hand
 
Join Date: Aug 2011
Posts: 1,756
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Grue View Post
if you want to get hired at the "best" place, and you want the "best" job, and get paid the most and all that, FFS, make something that someone, somewhere, uses, and other people can look at it say "oh thats really cool, its 100% clear that bringing this person into our organization would be a huge asset". If you can't or don't want to do that, why are you entitled to being hired at the above?
The author of that piece works at Amazon, which I think counts as one of the best places. Also the "best" places all think whiteboard >>>> side project for the most part fwiw - most famously:

https://twitter.com/mxcl/status/608682016205344768
candybar is offline   Reply With Quote
Old 10-29-2017, 11:27 AM   #30371
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I only got my very first contract on the strength of a side project (happened to be a poker fan), and they gave me a whiteboard test. As far as the rest, they really only care about:

1- Do you sound like someone with a better than 50 IQ?

2- Can you solve the problem at hand?

2- Do you know most of the tech at hand, though I've been finding that knowing the tech is irrelevant. Seems you'd be better off having a degree in dead sea languages.

I can only think of a few times where an interviewer saw my github or saw any of my side projects. Most of these will mention it, then admit they didn't really look. Most will admit that they didn't look when asked. I know there was a few times that one of my side projects caused a rejection. You can't really go into certain companies and show them a completed project that may as well be a competing project, or a competing product to an add-on they happen to be interviewing you to create.

My most recent project is considered "really cool" by a lot of people, but I have to explain what is happening under the hood for them to switch over to "that's amazing." I'm not sure if that's a good or bad thing.
daveT is offline   Reply With Quote
Old 10-29-2017, 11:42 AM   #30372
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Apple in Sunnyvale is hiring Clojure contractors. They first said remote is okay, but then back-peddled and said I have to be on-site. I'm not even sure what they would pay, but if other contracts from the Bay Area is an indication, it is far too low and wouldn't include relo assistance.

A company you all heard of, for example, wanted a Postgres person to manage dozens of databases. They asked me to relo to San Jose on a 3 to 6 month contract. They guffawed at my already low price and countered $35 / hour.
daveT is offline   Reply With Quote
Old 10-29-2017, 12:04 PM   #30373
Larry Legend
Celtic Pride
 
Larry Legend's Avatar
 
Join Date: Jul 2009
Location: Kyrie's earth
Posts: 41,383
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Dave, I'm not really sure what you mean by "the rest" but based on that list of 3 I'm guessing you mean C-tier and below companies? Because I'm sure there's no way that's how Google, FB, etc. Hire.
Larry Legend is offline   Reply With Quote
Old 10-29-2017, 12:41 PM   #30374
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I don't care about the tier; I care that they pay money, among other things. The low-ball offer was from a top-flight company.

I'm not sure how FB and other deal with contractors. I'd certainly not accept the hiring process for a contracting gig. If they expect me to do a 3-hour take home, fly out, face-to-face, and wait 4 weeks for a 2-week project, I'll happily bow out. And please don't ask me to relocate on my dime!
daveT is offline   Reply With Quote
Old 10-29-2017, 01:04 PM   #30375
kerowo
lolcat
 
kerowo's Avatar
 
Join Date: Nov 2005
Posts: 33,688
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

From the company or from a contracting company working for them?
kerowo is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 10:06 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online