HNHacker News
TopNewBestAskShowJobs

nakkaya

113 karma · joined August 5, 2009

http://nakkaya.com

nurullah@nakkaya.com

submissionscomments
nakkaya··on Why I self host my servers and what I've recently learned
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.
nakkaya··on Finland Becomes a Member of NATO on Tuesday 4 April
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.
nakkaya··on Build an Air Quality Monitor with InfluxDB, Grafana and Docker on a Raspberry Pi
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.
nakkaya··on Ask HN: What's a starting point for learning how to write programming languages?
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...

nakkaya··on Ferret: a Lisp implementation for real time embedded control systems
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.)
nakkaya··on Ferret: a Lisp implementation for real time embedded control systems
You are right. It is due to limitation of writing for embedded systems. I try to keep everything as close to Clojure as possible but some stuff is just not possible on embedded systems or behave a little bit different.
nakkaya··on Ferret – A free software Clojure implementation
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/

nakkaya··on Ferret – A free software Clojure implementation
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...

nakkaya··on Ferret – A free software Clojure implementation
Author here. It is the Half-Life logo. I wanted a lambda symbol for a favicon, love the game too so I settled on a open licensed logo.
nakkaya··on Ferret – A free software Clojure implementation
Author here. If I am not mistaken (I don't do web development.) very early versions of ClojureScript repl compiled code on the JVM side then piped the output to the browser. (Maybe it still does idk) I am thinking of doing something similar using Cling[1]. Ferret can compile and pipe output to Cling and use Cling as the repl.

[1] https://root.cern.ch/cling

nakkaya··on Ferret – A free software Clojure implementation
Author here. As derefr said with Clojure semantics you can not create cycles.
nakkaya··on Ask HN: What distributed storage technology are you using?
All clients has a copy of the git repo plus a server on Digital Ocean.
nakkaya··on Ask HN: What distributed storage technology are you using?
For backups, I have two git-annex [1] repositories,

- Personal files, stuff I can not afford to lose (photos,documents etc.) - Full archive on S3, full archive on a home server, 4 clients with partial copies.

- Big data stuff I can afford to lose (VM images, media files etc.) - Around 6 TB, each file has two copies split between 5 hard drives on home server and Hubic.

[1] https://git-annex.branchable.com/

nakkaya··on Scala Native v0.1
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/

nakkaya··on Ask HN: Transpiling a dynamically typed language to a statically typed language
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

nakkaya··on Thousands of Istanbul citizens walking to protest government
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...

nakkaya··on Thousands of Istanbul citizens walking to protest government
After WWI Turkey was divided between Christian countries France Greece England etc.
nakkaya··on Thousands of Istanbul citizens walking to protest government
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...

nakkaya··on Thousands of Istanbul citizens walking to protest government
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.

nakkaya··on Thousands of Istanbul citizens walking to protest government
> 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.

nakkaya··on Thousands of Istanbul citizens walking to protest government
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.
nakkaya··on Thousands of Istanbul citizens walking to protest government
> 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...

nakkaya··on Let me see your Lisp implementation. Here's mine.
http://nakkaya.com/2010/08/24/a-micro-manual-for-lisp-implem...
nakkaya··on Ferret: An Experimental Clojure Compiler
No, I didn't know there was a llvm backend for avr.
nakkaya··on Ferret: An Experimental Clojure Compiler
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.
nakkaya··on Ferret: An Experimental Clojure Compiler
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).
nakkaya··on Alter-ego - A Reactive AI Library
In addition to the links _delirium provided,

http://chrishecker.com/My_Liner_Notes_for_Spore/Spore_Behavi...

http://aigamedev.com/insider/presentations/behavior-trees/#r...

http://books.google.ru/books?id=1OJ8EhvuPXAC&lpg=PA370&#...

and for people who prefer XML there is a simular architecture based on FSMs called XABSL,

http://www.xabsl.de/

which is used heavily among Robocup teams.

nakkaya··on Lindenmayer System in Clojure
My mistake linked to the wrong page, formula I used is from L-System article, example 4.
nakkaya··on Arduino pop3 email checker
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.
nakkaya··on How to take down an F-117
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
Page 1 of 2Next →