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

I see you include the dot disconnect "." as part of the Bond definition.

You also define Chain as:

  Chain <<= pp.Group(pp.Optional(Bond) + pp.Or([Atom, RingClosure]))
I believe this means your grammar allows the invalid SMILES C=.N


That's "SMILES".

Yes. Here is the yacc grammar for the SMILES parser in the RDKit. https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/Smi...

There's also one from OpenSMILES at http://opensmiles.org/opensmiles.html#_grammar . It has a shift/reduce error (as I recall) that I was not competent enough to fix.

I prefer to parser almost completely in the lexer, with a small amount of lexer state to handle balanced parens, bracket atoms, and matching ring closures. See https://hg.sr.ht/~dalke/opensmiles-ragel and more specifically https://hg.sr.ht/~dalke/opensmiles-ragel/browse/opensmiles.r... .



Link to the actual "etude" https://archive.org/details/wetherell-etudes-for-programmers... (Wetherell has a number of small, interesting programming "etudes", one of is to write a TRAC interpreter.)

Some background. Calvin Mooers developed TRAC - the programming language - in the 1960s for "duffers", that is, people who were not computer scientists.

(A phrase he used in the writing of the time was "duffers", though I don't know if he specifically applied it to TRAC users.)

It was the first homoiconic language. There were a group of teens interested in programming that hung out with Mooers. One of these was L Peter Deutsch, who at 18 (and a year after writing LISP 1.5 for the PDP-1) helped develop the TRAC language and wrote the first TRAC implementation. Deutsch later implemented Ghostscript.

About 10 years later, Ted Nelson's "Computer Libs" suggested TRAC as one of the first three programming languages to start with. This made people more widely aware of TRAC, and of course people did their own implementations, as seen in this link.

Mooers, though, was very protective about what was "his." He pushed for software copyright production back in the 1960s. The best he could do was trademark the term "TRAC", and send cease&desist letters when someone used it. See this article from the first issue of Dr. Dobbs: https://archive.org/details/dr_dobbs_journal_vol_01/page/n12...

I talked with someone who had met one of Mooers' daughters around Cambridge. He knew Mooers was, and had (as I call) a copy of Computer Lib with him. He got invited to dinner with the Mooers family. All went well, until he revealed he had written a version of TRAC for himself. This was a sore point. Mooers got up and left. He wife commented that Mooers didn't like others playing with his toys.


Could someone explain what "democratising" means here? Is it any different than "user-friendly", "enabling" or "simplifying"?


On the return from my first trip to South Africa I carried 12 bottles of wine in my luggage.

That was back when flights included two free checked items.

On my second trip to Europe one of my suitcases was full of T-shirt swag to give out at a conference. Lugging both up the stairs, across the train tracks, and back down was a hassle.

Both of these were over 20 years ago.

And then there's the story at https://notalwaysright.com/a-steam-powered-cruise/392530/ of a couple trying to bring a full-size espresso machine on their cruise, so they can have their special coffee.


> On the return from my first trip to South Africa I carried 12 bottles of wine in my luggage.

Totally understandable! Amazing wine - I didn't want to leave Constantia. But I picked myself up and dragged myself to Stellenbosch !

And at the end of the trip, I didn't want to return home. Such an incredible country that still holds a very special place in my heart


You didn't have to pay duty on them?


I ... probably did?

I didn't.

Things were a lot looser then. I brought a 6-pack of Negra Modelo as carry-on for a trip to Europe. The airport x-ray staff in Albuquerque recognized it on the screen, which impressed me. They had no problem with it.


I was a nomad for about a year. Towards the end I was tired of the constant leaving.

I asked for advice from an NGO who moves countries often. She said what happens is the NGO members become part of the extended connection, which helps with that situation.

Even when I was a nomad, I wouldn't have been without a suitcase. My big hobby then was dancing - mostly salsa and tango - and I needed several changes of clothes and dance shoes. And, umm, not all black clothes.

To make it worse, indoor smoking was legal, so I would come home with stinky clothes that I wouldn't want to wear again until washing.

I also did some upper undergrad/grad level visiting teaching, and would stay at a staff members home, or in one case the home of the parents of one of the grad students. I brought a dozen or so greeting-style cards with nice pictures of the city I used to live in, so I could leave them as a thank you, with an image of what for them would be an exotic place.


I went backpacking last year for only a little over a month. Absolute pain in my chest when someone who I'd gotten to known over the past few days said it was their last day lol.


I work in a chemistry research field. Most people I know run Python programs for their research. No one I know uses Go. I only know a handful who use Java. Rust and Julia are oddities that appear occasionally.

Sure, we have very different experiences. But that also means that unless you can present strong survey data, it's hard to know if your "Most people" is limited to the people you associate with, or is something more broadly true.

The PSF overlap with my field is essentially zero. I mean, I was that overlap, but I stopped being involved with the PSF about 8 years ago when my youngest was born and I had no free time or money. In the meanwhile, meaningful PSF involvement became less something a hobbyist project and something more corporatized .. and corporate friendly.

> scientists (who buy expensive training courses)

ROFL!! What scientists are paying for expensive training courses?!

I tried selling training courses to computational chemists. It wasn't worth the time needed to develop and maintain the materials. The people who attended the courses liked them, but the general attitude is "I spent 5 years studying <OBSCURE TOPIC> for my PhD, I can figure out Python on my own."

> who are force fed Python at university

shrug I was force fed Pascal, and have no idea if Wirth was a nice person.

> main reason for its popularity in machine learning

I started using Python in the 1990s both because of the language and because of the ease of writing C extensions, including reference counting gc, since the C libraries I used had hidden data dependencies that simple FFI couldn't handle.

I still use the C API -- direct, through Cython, and through FFI -- and I don't do machine learning.

> If it is so popular, why the booster articles?

It's an article about a company which sells a Python IDE. They do it to boost their own product.

With so many people clearly using Python, why would they spend time boosting something else?


The Swedish non-government system (BankID) doesn't work well for me. My Swedish identity must not be dependent on the permission of a US company nor the US government, while BankID requires both.

So far my BankID boycott is over a year old, and my resolve grows as I read more of the news.


I once had my bank close my account because of a mistake they made (I can provide the background but it’s just a facepalming story). That meant my Bank ID was closed down, too.

I asked for an appointment with the bank to resolve it but was told I can only get an appointment with Bank ID.

It was outrageous. Obviously none of the other services worked either. Luckily I still had a British and a German credit card that I used for payments (since I lived in both those countries before). In the end I opened an account with another bank and moved on. Although I did try, furiously, for two weeks to get my old bank to admit their mistake and rectify it. No chance. If they had admitted it it would’ve meant they would have broken financial regulation, and obviously you don’t admit to that if you don’t have to.

Bank ID is great when it works and brutal when it doesn’t.

I actually don’t have a better proposal for a system since it works quite well in most cases, but just wanted to share my bad experience on it too.


Ask your bank for a pin machine, you can get a chip and pin machine to solve BankID challenges.

The machine itself is likely manufactured in China, but it’s of no consequence. You wouldn’t be able to communicate with me if you didn’t use chinese products at all.


You mean Bank-id på kort? https://sv.wikipedia.org/wiki/Bank-id#Bank-id_på_kort says it only supports MS Windows and MacOS, not Linux.

Fundamentally though, that doesn't change the fact that the US can order a Swedish bank to either freeze access to a customer or the bank can no longer do business in the US.


I can confirm. I started grad school in physics there in 1992. The weekly department colloquium was on Thursday afternoon, just after the latest Onion came out. It was not uncommon to see a few people reading it during the talk.


I personally prefer snap over jounce, as that gives the progression snap, crackle, and pop.

See https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_deriv...


Why would anyone downvote this?

Obviously, someone on the intertubes was being a jerk about jounce!


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

Search: