Hacker Newsnew | past | comments | ask | show | jobs | submit | manlobster's commentslogin

Golang is sometimes considered a simple language, but it's not really beginner-proof like Java was designed to be. It's a good idea to spend time learning it thoroughly.


Generating the HTML in a container seems like a better solution than ditching the generator altogether.


> Here's one of them, which follows a common recommendation in the Go community to use a sentinel error to represent the "value not found" condition.

Is this really a common recommendation in the Go community? Seems like returning `bool` to indicate if the value was found is somewhat of a no-brainer, since it follows the familiar approach used for map lookups and type assertions.


I've certainly seen and emulated this pattern in a lot of Go code. I don't know if I am representative of the larger community. I often use bool unless there are other error conditions (and there often are), but this article is definitely making me wonder if this is ideal.


There are at least two places in the standard library that behave like this: sql.ErrNoRows and the error thrown by os.Open when a file doesn't exist.


True, but both of these are for relatively slow operations, where the performance of the error checking is relatively insignificant.


It has also become somewhat common to use io.EOF to signal the end of iteration, like the reader libraries do.


Do OpenAI employees actually get equity in the company (e.g. options or RSUs)? I was under the impression that the company awards "profit units" of some kind, and that many employees aren't sure how they work.



> Although primarily known for ChatGPT, OpenAI has had a long history since its founding in 2015.

No, "since 2015" is by definition not "a long history".

For a long history, try the principality of San Marino, or (if you want a company) Stora Kopparbergs Bergslags AB. Or one of the Japanese temple-builder family companies. 2015 "a long history" -- wasn't that when I last took a dump?


> many employees aren't sure how they work.

Why aren't they simply asking their product?


I don't love the $...$ syntax for executing commands. Using $ as a string delimiter is very strange to my bash-accustomed eyes.

It's a shame that they provided such weird syntax for the most important thing you tend to do in a bash script, while providing fairly nice syntax for everything else.


and i dont like how it's inconsistent that echo is not using the $ syntax (which makes sense internally, as it's a built-in, rather than executing the $echo command).

Overall, it is cute and neat, but i find that if you are looking to write bash scripts that require this level of programming, you'd be better off writing it in python, or perl. Only in very austere environments can this be utilized, but the requirement of having `bc` installed means you must also have the ability to run package installation, so might as well run the package installation for a full on programming language!


I think that this does fill a niche. You can still compile to bash outside of this austere environment, and run the scripts within it. And python isn't very ergonomic for running external shell commands (or, say accessing environment variables), the syntax for doing so in amber looks much neater.


> the requirement of having `bc` installed means you must also have the ability to run package installation

I don't remember ever installing bc, but I use it frequently and it's always there. Are you sure it's not already part of most base systems?


No, it's often not, it's one of the common package you install manually to compile a linux kernel


> I don't remember ever installing bc, but I use it frequently and it's always there. Are you sure it's not already part of most base systems?

In my bash scripts, using `bc` makes my script not work on git-bash under Windows. Almost everything else I do in a script that isn't linux-specific (including netcat/nc usage) runs in git-bash for Windows.


It's not pre-installed on Debian and SUSE.


It's part of posix and should be available anywhere a posix like environment is offered.


Shelling out to awk would be a more portable choice than bc, though awk would bring you much closer to the featureset of Amber to begin with.


Why does everyone need to live in Palo Alto? There's housing elsewhere. If we built more housing in Palo Alto, it wouldn't be such a nice place to live.


It's not clear to me that every site would have to perform age verification themselves. Seems like the "I am a minor" flag could be managed at the client operating system level (e.g. as a property of the cell account on mobile devices, or as a property of the user account on a laptop or desktop machine), and transmitted per-request (e.g. in a HTTP header).


Then we would have mandatory online-only accounts for the OS "for your safety". This sounds even worse.


I think it would be better if this was a code generator similar to `protoc` for gRPC, so we don't have to learn yet another implementation language.


One of the devs here. We plan to release an updated code generator (jolie2java) that will make it easy to do exactly that. (For Java, but Jolie is already designed to support other langs as well in the future.)

Specifically, you'll be able to use Jolie to write (tech-agnostic) APIs and then implement them in Java, using types automatically generated from the Jolie APIs.


This is good to hear - the big problem I have with justifying more niche languages is that I have to ultimately use some niche library at some point that only exists for more established languages.

I hope you guys try to make a first class transpiled language.


You could view the trial-by-Leetcode that people undergo when they switch jobs every 4 years or so as a form of relicensing. One advantage that the current setup has over officially proctored examinations is that you get to try again repeatedly until you are successful.


Other industries do not require repeating the license exam. Many have continuing education or other professional development requirements. These can be expensive and time consuming but not difficult generally.

Real licenses do not expire without notice. Real license exams are more consistent, have clear pass criteria, and have higher pass rates.


Looks like all the heavy lifting is being done by webllm [0]. What we have here is basically one of the demos from that.

[0] https://webllm.mlc.ai/.


> I’ve used the WebLLM project by MLC AI for a while to interact with LLMs in the browser when handling sensitive data but I found their UI quite lacking for serious use so I built a much better interface around WebLLM.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: