HN user

nakkaya

113 karma

http://nakkaya.com

nurullah@nakkaya.com

Posts2
Comments31
View on HN

Yes there are. I would suggest going through the subreddit mentioned /r/selfhosted. There are GUI tools and NAS products that would let you host docker images. As for CLI ask an LLM, for simple common commands you are going to be dealing with they are pretty good at it.

The thing most people on the West doesn't seem to get is, there are issues that predate Erdogan. Such as this one, whoever replaces him will make similar requests in a less childish more diplomatic way. There is legitimate concern across the voter base that the West is supporting Kurdish terrorist groups. No matter which party wins if they want to be re-elected they will need to address the same concerns.

At work one of the projects I work on is the telemetry system for a solar race car. I have pretty much the exact setup. We grab the data from the CAN bus transmit it over the radio to the chase vehicle. Data needs to be logged so you can create/test algorithms for predicting optimum speed for the car and also run the algorithms during the race. We don't use PI but a headless linux box will receive all data. During the race both the electrical and mechanical teams needs to see this data. Grafana pools the DB and everyone with a PC, Smart phone or tablet has access to the telemetry. Computers break if the server on the chase vehicle (centos box) breaks I will have reasonable confidance that I can run the telemetry system on my laptop (ubuntu box) with a couple of docker commands. So on top of OP I have a pinch of Clojure, Matlab, Postgres.

I maintain a programming language called Ferret [1]. You can read through the manual, it is a literate program, covers everything you need to implement your own lisp. Compiler, optimizations, runtime, garbage collection etc. [2] overlaps with [1] covers how to compile a restricted subset of Clojure to C++. If you are interested in interpreters [3] has an implementation of the "A Micro-Manual for Lisp - not the whole Truth" in C.

[1] https://ferret-lang.org/ [2] https://nakkaya.com/2011/06/29/ferret-an-experimental-clojur... [3] https://nakkaya.com/2010/08/24/a-micro-manual-for-lisp-imple...

If I were to go with C I would have to reimplement OOP machinery required for an object system. OOP also makes memory management a non issue. Functions are first class citizens in Lisp so functors/lambdas makes it real easy to create closures. std::atomic combined with Clojure semantics makes sure there no race conditions. std::thread / std::future makes multi threaded programming much easier. Templates help with picking and choosing which components to include (i.e there are multiple memory managers to pick from.). etc. etc. Non of the above is essential and can be done in C but why bother, GCC/LLVM people are much better at this then I can be including platform specific tricks for different architectures. Modern C++ is very close to Lisp after all it only takes 6 passes over the Clojure code to generate C++ code. (Compiler makes more than 6 passes but others are for optimization.)

Author here. Did not knew about Céu till now, just watched the intro video. I maintain a behaviour tree [1] library called alter-ego [2] (code needs cleanup) which already contains some of the constructs. In behaviour tree terms par/or is parallel selector and watching is a interrupter node. [3] So it can be done in Ferret on a general purpose PC using C++11 concurrency constructs, for embedded targets it will require co-operative multitasking which is on the roadmap.

[1] https://nakkaya.com/2010/06/29/alter-ego-a-reactive-ai-libra... [2] https://github.com/nakkaya/alter-ego [3] http://aigamedev.com/open/article/parallel/

Author here. I am actually curious about this myself. I originally released it under GPL but then on another HN thread someone said anything compiled with it also ends up being GPL, so I switched to BSD 2 Clause. I have not copy pasted code from Clojure compiler BUT in order to keep the Ferret semantics the same as Clojure semantics algorithms are identical. [1] shows + function in Ferret and Clojure. As for data structures situation is similar, same semantics implemented in C++ instead of Java with some differences/tweaks geared towards embedded systems.

[1] https://gist.github.com/nakkaya/7050d5daf2c7034a25bb079658d8...

Scala Native v0.1 9 years ago

I maintain a project called Ferret [1], which compiles a subset of Clojure to C++11. No VM no dependencies you get a single cpp file that can be compiled to native code. Supports any platform with a C++11 compiler. (atmega, arm, x86 etc.)

[1] http://ferret-lang.org/

It is possible. Some scheme compilers use C as their intermediate language. Scheme to C to binary. (Gambit/Chicken/Stalin etc.). I have a project [1][2] that compiles a subset of Clojure to C++11 that is written using literate programming [3]. It thoroughly documented and should give you an idea on how to build your own.

[1] http://dropbox.nakkaya.com/builds/ferret-manual.html [2] http://nakkaya.com/2011/06/29/ferret-an-experimental-clojure... (Old version for more documentation on the idea.) [3] https://en.wikipedia.org/wiki/Literate_programming

I'll begin by saying I do not believe in a personal god. Well Imams as guidance counsellors are extremely dangerous because unlike Christianity Islam never had the enlightenment period it is still stuck in middle ages. That's why you have people getting stoned in 2013 or girls getting gang raped and then executed for blasphemy search wikipedia for references. This is line of thinking these kids will be guided to and when you have 80k mosques vs 60k schools it will get out of hand really fast. Just the other day there was a protest where people literally kissed each other they were attacked by by people telling them this a muslim country and them, the religious youth won't let that.

You can not go to court that’s the problem. Checkout today’s papers for Turkey sabah vatan zaman etc. You don't need to know Turkish you won't see a single picture of the riots. Here is the cover of one of the biggest sabah [1].

[1]https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash3/94205...

But this is not about Istanbul. It is not about a park or a shopping mall, you hear about Istanbul because that’s where 1/4 of the country lives in there are protests in Ankara Izmir Eskisehir Adana etc.

> but your particular examples are not that radical to be honest.

Every time I head that I like to remind people that Iran in the 70s was not much different than your average European country [1].

https://www.google.com/search?q=iran+70s&num=50&safe...

Forcing Religion on children: No I mean Imams acting as guidance counsellors. Children refusing to take religion classes not given their grade cards.

Restrictions on TV: You do not /can not threaten to cancel a TV show as a prime minister because the show portrait a Ottoman sultan in a way he did not like (I do not watch tv I don't know the exact details but that’s basically what he said.) Still not a single government run TV station (basically all but two) said anything about the riots. How is that not a restriction?

Jailing journalists: I am talking about the ones that did not do anything but jailed. And half the army is in JAIL most not even formally accused for years and the people affiliated from the terrorist organization are called as witnesses imagine bin ladin as your star witness, and tell me this is not f.cked up.

> He was thrown into prison

And the same guy, now prime minister jailed a world renowned pianist because he quoted a poem criticizing Islam (for foreigners technically court jailed him but they basically control that too) . Repeat after me Turkey as a country does not have a religion. You can believe in the power of the stone for all I care as long as you do not throw it on my head. Erdogan's actions are just doing that. I do not want to live in a country where kissing in public gets you arrested, homosexuals are hanged publicly or my daughter bought/sold like a common house good. When Erdogan criticizes something/someone (this went as far as calling the founding father a drunk which if it wasn't for him Turkey would be Christian country.) it is a democratic right when regular joe/journalist/MP does it he/she gets jailed.

Park protest was just the tipping point. Current government has been slowly transitioning the country into Islamic rule. There were numerous things that preceded this, ban on abortion, ban on alcohol, jailing journalists/MPs, forcing religion on children, restrictions on TV basically all TV stations are owned by the government ( and not a single one mentioned the protests last night btw or the bombing that recently happened imagine no one reporting 9/11), and not to mention every recent protest met the same police brutality.

> the police reaction isn't more violent than say the crack down on the Occupy protests

Really, so in the US people got beaten up up by the police [1], thrown tear gas from police choppers, multiple people ran over by police armoured personnel carriers and died, unarmed civilians got hit in the head with tear gas canisters and died [2]. Secretary of health (who is supposed to be a medical doctor) refused to send ambulances to the injured because they were protesting against the government. What the hell are you smoking?

Both links NSFW, [1] https://www.facebook.com/photo.php?v=519364864791286 [2] https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/10a8a...

This is how most Lisp compilers work. Gambit, Stalin, Chicken they all use C as the intermediate language. Currently this works on my MacBook, beagleboard and any avr microcontroller with enough ram and flash memory. If I were to use machine code I would have to output 3 completely different instructions sets.

The reason I used ref counting instead of a proper garbage collector is that, most microconstollers have couple kilobytes of ram (a ATmega328 has 2KB) every garbage collection scheme I've looked at was using a lot of ram, plus ref counting is slow but it is predictively slow, if you are taking measurements at 100 times a second it will always be 100 times a second, you won't have pauses right in the middle of the routine (or say when you are in the air making a maneuver).

I would suggest getting a starter kit from makers shed, it comes with a bunch of sensors resistors and cables to start hacking right away. You can also get a arduino prototyping shield that mount on top of arduino with a breadboard on it.

i would love to discuss this further, but HN is not the place to do it, if you are intrested my email is nurullah@nakkaya.com