HNHacker News
TopNewBestAskShowJobs

xnacly

562 karma · joined April 27, 2022

website: xnacly.me

“Arguing that you don’t care about the right to privacy because you have nothing to hide is no different than saying you don’t care about free speech because you have nothing to say.” ~ Edward Snowden

submissionscomments
xnacly··on Abusing C to implement JSON parsing with struct methods
Hi, author here, I just added the JSON macro to omit the quotation escaping around object keys and strings:

without JSON macro:

char* j = "{ \"key\": [\"value1\", \"value2\"]}";

with JSON macro:

char *j = JSON({ "key": ["value1", "value2"]});

But yes of course, due to the stringify no C values can be embedded - i wouldnt even know how one would solve this with a macro, but maybe someone has an idea and can comment on that.

xnacly··on Abusing C to implement JSON parsing with struct methods
Hi, author here, definitely, allocating elements while parsing is slow, especially calling realloc for each new element encountered, a growing array backed by an arena would be my go to if i had to overengineer this one.
xnacly··on Abusing C to implement JSON parsing with struct methods
Hi, author here, i use the 'type' field of the json_value struct, strings, object keys, object values and array members are allocated, i use this info for freeing the memory
xnacly··on Rhai: An embedded scripting language for Rust
It just mentions a loop, so id say for a loop without any content, it should be less than 50ms, but as the other commentor said, it depends on your hardware and a better measurement is to compare relatively
xnacly··on Rhai: An embedded scripting language for Rust
According to the documentation it evaluates by walking the ast, so yes, this is considered very slow. The readme also mentions 1 million loop iterations in 0.14s (140ms). Even my unoptimised naive lips like language [1] (also implemented via a ast walker) does the same in 28.67ms - so yes id consider this pretty slow.

[1]: https://github.com/xNaCly/Sophia

xnacly··on 38th Chaos Communication Congress
Yeah but thats a good thing :)
xnacly··on 38th Chaos Communication Congress
Can you elaborate?
xnacly··on Starlark Programming Language
I feel like no other embedded scripting language will ever surpass lua. Neovim, roblox and all my projects that needed scripting support use lua, its my first choice.
xnacly··on Optimizing a Go Package by 38147125738.8x
It specifically says ns/op, go test executes the operation many times and calculates the average execution time for one operation:

https://pkg.go.dev/testing#hdr-Benchmarks

xnacly··on Fun with Go Iterators
I get that, i still dont like to write f5(f4(f3(f2(f1())))) instead of writing f1().f2().f3().f4().f5()
xnacly··on Google Scholar PDF Reader
I couldn’t agree more, I dont want you displaying the pdf, let me download the file and view it with zathura
xnacly··on Inserting 100k rows 66 times faster
I didn’t even think of that, I‘m gonna have to try them out and compare against the two other implementations.
xnacly··on Netflix: Piracy is difficult to compete against and growing rapidly
At least for the last point i can recommend jellyfin. It has a web interface, a android tv app and an iphone app. I use it on my phone, tv and in the browser.

https://jellyfin.org/

xnacly··on RSA is deceptively simple and fun
I wrote a similar blog post a while ago using python [1]. I however attacked RSA using prime number factorization.

[1]: https://xnacly.me/posts/2023/rsa/

xnacly··on Improving programming language performance
Thanks, I think this language will probably keep my hacking for a while :). you're right about the keyword naming, i tried to be unique, maybe too much for functions, simply because i love them being named "fun". Let in the current implementation definitely is confusing due to it being used for defining and updating a variable and its contents - maybe ill change it to let and set or def and set, who knows. Thanks for the feedback :)
xnacly··on Improving programming language performance
that is true, miscalculated on my side, maybe i was to ecstatic by the improvement
xnacly··on What I learned getting acquired by Google
How would one go about working at google as a junior fullstack developer? I wanted to work remote or onsite in germany but there seem to be no open positions
xnacly··on Ask HN: Could you share your personal blog here?
https://xnacly.me/

I really enjoy writing especially to work on my english and how i express my thoughts.

I try to write at least one post a month but im usually pretty busy with work.

My top 3 favorite posts are:

linux guide for powerusers https://xnacly.me/posts/2022/linux-for-powerusers/

Rsa and python https://xnacly.me/posts/2023/rsa/

Lexical analysis of Markdown in Go https://xnacly.me/posts/2023/lexer-markdown/

xnacly··on Ask HN: Who is hiring? (May 2023)
For others outside the us:

To conform to U.S. Government space technology export regulations, including the International Traffic in Arms Regulations (ITAR) you must be a U.S. citizen, lawful permanent resident of the U.S., protected individual as defined by 8 U.S.C. 1324b(a)(3), or eligible to obtain the required authorizations from the U.S. Department of State.

xnacly··on Ask HN: Most interesting tech you built for just yourself?
Currently i think my markdown to html converter, which i wrote without any dependencies and completely from scratch (except for a websocket lib). It supports watching for file changes and creating a live preview in the browser.

Source: https://github.com/xNaCly/fleck

xnacly··on Ask HN: What's your residential Internet speed and cost?
Germany, 250MBPS Download, 50MBPS upload, costs around 40€ or 44$ per month.
xnacly··on Data-Free Disney
Thats some dedication, i applaud the author for keeping her kids private
xnacly··on How to periodically sync a Git repository with its remote
That's a great question. Foremost, I wanted to learn go, and I wanted something I can have running in a terminal with logs and directy feedback. Also i dont really know cron or systemd.timer, but ill look into it.
xnacly··on Ask HN: Share your personal site
A little late to the party but heres mine: https://xnacly.me

Its a simple hugo generated static site with my own theme.

xnacly··on Writing an Interpreter in Go
This looks awesome, ill probably buy the book
xnacly··on Ask HN: Preferred Platform to Blog
I use hugo for my personal site / blog, the source code is hosted on github and deployed to a custom domain bought and managed on namecheap. Github has a premade action for this, its pretty easy to setup, debug and write posts due to the use of markdown
xnacly··on 26 Programming Languages in 25 Days
Very impressive i couldn‘t even get past day 7
xnacly··on Show HN: Obsidian Canvas – An infinite space for your ideas
Sadly not out of the box im afraid, there is a plugin for that though [1]. This plugin is not as advanced as say onenote, but it works for small things

[1]: https://github.com/zsviczian/obsidian-excalidraw-plugin

xnacly··on Min: A fast, minimal browser that protects your privacy
A browser in electron? At this point just use chromium - makes no difference.

Anyway, use firefox or librewolf. Stop enabling the chromium monopoly!

xnacly··on NetNewsWire: Free and Open Source RSS Reader for Mac and iOS
I would probably recommend feedly, its okay but not the best
← PreviousPage 2 of 3Next →