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

Also another option for fun in the browser Elm. check out similar older project https://github.com/Malax/elmboy


I want to dissuade anyone possible from looking at Elm. I used it professionally for about six months before I convinced my org to switch away. It simply doesn't have the type system to support complex programs, and the maintainers have a really noxious relationship with the community.


chill bro. spending some time on Elm is not the end of the world and not a serious issue! the question was about learning and not concerned about production and this was one of the available examples to maybe have a look at.


Weirdly hostile way to treat someone contributing to the conversation.


one of the options for fast iterations would be Forth. in its circles, it famous for generation targets and cross compiling between archs. seaech the net you shold find plenty.


I concur. not intermediate code directly machine code, even no tests. It will take human specs internally understand them (maybe formal methods of reasoning) and keep chatting with the user asking about any gaps (you. mentioned a and c, what about b) or ask for clarification on inconsistencies (i.e. in point 16 you mentioned that and in point 50 you mentioned this, to my limited understanding doesn't this contradicts? for example if we have that based on point 16 and have that based point 50,how do you resolve it. in short will act as business analysis with no (imagined) ego or annoyance in the middle by the user. from talk to walk



Achieving Correctness is really satisfying. however it is hard and difficult. IMOH this does in general polarize the scene (proving fanatics on one extreme and the other side who are not even testing the code) IMHO flushing out what you are designing does help and goes along the way of having fewer bugs. one old relatively yet easy and accessible formal toolkit which helpful in flushing out process is Z notation . one of the accessible books, old yet an easy read and rewarding is

"Software Development with Z. A practical approach to formal methods in software engineering"

https://archive.org/details/softwaredevelopm0000word/page/n1... .

there are other notations developed later. but its simplicity and easiness even while scribling on paper or word processor gets me back to using it every now and then


I've a good track record of having my programs work without bugs, I don't think it's too hard. The way I work is to restrict myself to using building blocks that I know work well and produce correct results. For example: using state machines, never breaking out of a loop, tackling all the edge case before the body, using simple data structures, don't use inheritance or exceptions, don't interact with files natively, don't use recursion, etc. etc.

When I face a programming problem I map the solution to those simple building blocks, and If I can't I try to change the problem first.

Formal methods are hard if you want to prove the correctness of a hard algorithm, but you can almost always do without a hard algorithm and use something really basic instead, and for the basic things you don't need formal methods.

The people who write the most bugs in my experience do it because they don't fully understand the building blocks they're using, and rely on other things for correctness like the type checker or unit tests. They view code as a stochastic process, write code they don't fully understand and have accepted the resulting bugs as a fact of life.


MMV But for me at least i tend to use it for brain storming, aka intial sailing through a subject/topic/task, getting intial idea. the idea is to use as an admin who is guided by you throgh chatting. for example im given a task to translate a user description/requirement to pull something from the database. like (simplistic example) what are the top grossing films by category within each rating. so igive the AI the database tables schema and give it literally the user requirement. and see what it gave back and compare it with how I'll do it. ask it more for optimizations what else can be done more.... etc.. keep chating with the AI until I'm bored ;)


The same here. It helps my slow autistic context switching a lot.

It's easier for me to recognize the ideas, concepts, keywords it has written than to recall them from memory when my "memory cache" is empty.


for these critical applications which require reliable oprations as lives are at stack. formal verfication will help by reducing bugs more than traditional testing. they are not bullet proof but still better. z notation is one of many.


i'd like to know the source. and the reasons i know long time ago are about more innovative work. like more compression, keyboard layout optimization, like having the code compiled in the source and utilizing the space to embed the meaning so there is no multiple parsing and compiling. even vars are living inthe code alive. and others i don't remember now.


Wikipedia [0] via Dave Gauer's Forth webpage on Ratfactor.com [1]

[0] https://en.wikipedia.org/wiki/ColorForth

[1] https://ratfactor.com/forth/the_programming_language_that_wr...


its really leads to all sorts of question. when markets for eggs and sperms to be sold directly to interested (the layman) are there and the buyer funds the rent of the artificial womb and the food/nutrition + bio conditions. will he be the father or the owner? if more over the buyer have a farm (so to speak) of wombs?


This already exists just with surrogacy as there are both egg and sperm banks available to those who need them.

A lot of Hollywood stars these days are using surrogacy, it is quite common: https://people.com/parents/celebrities-who-have-used-surroga...


> This already exists just with surrogacy as there are both egg and sperm banks available to those who need them.

True, and if you saw what played out during COVID you'll realize there is a massive market for this: during COVID healthy, viable sperm supply outstripped supply significnatly, and the market dynamics went into effect. Some so brazen as to advertise on FB to do so [0].

Surrogacy continued to thrive during COVID and was only hampered because of the Russian invasion, it is hoime to perhaps one of the biggest fertility/surrogacy countries on Earth. Lots of children were born during the war and have not been reunited with their families yet, either.

It's one of the many stark and bleaker parts of the War and ultimately about the Human Condition that make me think that while we are likely inching closer towards a Brave New World situation, with all the dire implications that go along with it, that when it comes to fertility this might be the best of all bad solutions.

Personally, I have chosen to delay having children for what will likely be another decade, after not following in my parent's or siblings footsteps of having children in their 20s. Its a conscious decision but ultimately a forced one: namely political strife, environmental factors and climate change are at the forefront but there are more. And seeing fertility rates absolutely crater in the 21st century in anything but the most economically dire of places (namely Africa and India) I think having the framework ahead of the device might be wise as we will have to eventually kick-start a new baby-boom in order just to reach a semi-parity as millennials like myself enter as the larger cohort with similair delays in childbirth--I''m an outlier in having children, most of my friends over 30 just don't even want children if they haven't already had them.

0: https://www.nytimes.com/2021/01/08/business/sperm-donors-fac...

1: https://www.nytimes.com/2022/03/12/world/europe/ukraine-surr...


> I have chosen to delay having children for what will likely be another decade

I would recommend to anyone who eventually wants children someday to not delay. Fertility worldwide will get worse before it gets better.


I mean, this regulatory effort, centered around rules for trials of artificial wombs for use as NICU alternatives for very-premature infants, don’t really raise that issue; they would basically be medical gear like incubators (but, presumably, only get approved if thet offer an improvement in outcomes.)


Perhaps whatever policies exist around surrogate pregnancies now would apply there also.


ppl can already have arbitrary amounts of kids either in a nuclear family setting or “spreading their seed everywhere”. given they’re still responsible on paper, but that doesn’t stop someone from doing it in the first place


this may be interseting (YMMV) read page 50 of "Compiler Construction for Digital Computers" 1971 which lists other reason some which are still valid and good to know


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

Search: