HNHacker News
TopNewBestAskShowJobs

the-smug-one

841 karma · joined August 10, 2020

Not actually smug, at least not on purpose.
submissionscomments
the-smug-one··on Competitive Programming with AlphaCode
I'm trying to solve this for fun, but I'm stuck! I've got a recursive definition that solves the problem by building a result string. I think it's a dynamic programming problem, but right now I can't see the shared sub-problems so :). Some real sour cherries being experienced from not getting this one!
the-smug-one··on Nvidia prepares to abandon $40B Arm bid
The latter AFAIK, "poaching talent" is a pretty common term so I thought the meaning would be clear :-).
the-smug-one··on Nvidia prepares to abandon $40B Arm bid
So I recently watched a video on this. Black tea is fermented green tea, Europeans did not know this before getting that knowledge through a spy. Europeans "stole" everything regarding the production of tea, and poached a few Chinese tea masters along with it.
the-smug-one··on Tips to grow your North Korean Startup
So then the US is equivalent to the DPRK for wanting to put Julian Assange and Edward Snowden in prison?
the-smug-one··on Tips to grow your North Korean Startup
>. It starts with the state trying to be socialist and then "withering away" to full on communism

This is too simplified to mean anything. The USSR had many socialist branches, where the bolsheviks ultimately won out in a power struggle. The bolsheviks wanted state control, the citizen working for the state, while others were into having actual soviets where the citizens would've taken control of their means of production. Having a parliament and democracy was important to many of these groups (and the liberals who were also politically active). I wouldn't recommend a dictatorship, regardless if it has "of the proletariat" as a suffix.

the-smug-one··on Tips to grow your North Korean Startup
Cuba is equivalent to NK? Doesn't Cuba mostly incarcerate journalists, while in NK people are publicly executed for importing Squid Game?
the-smug-one··on Cultures where men and women don’t speak the same language (2017)
Can it be extended with a reference to the (self-)object? Like "me llamo" being "I call myself" in Spanish for "my name is".
the-smug-one··on Advent of Code 2021
And that is bad?
the-smug-one··on Advent of Code 2021
Fun fact: Kattis is how a lot of homework is distributed at KTH, seeing it being mentioned always brings up some nice memories :).
the-smug-one··on Without parental leave I might be dead
You are very special. Do you meet a lot of different people? Like, different countries, adults with parents from other socioeconomic backgrounds, people with chronic diseases, all of that stuff? Because, to me, it really seems like you don't.
the-smug-one··on “The Dawn of Everything” explores how human beings once lived together
I haven't read any classics from anarchism but the notion I got from Noam Chomsky is that anarchism isn't about a complete lack of power structures, it's about demanding that there are adequate reasons for them to exist. So government wouldn't necessarily be gone under an anarchist system, it would only disappear if the collective decides that it is unnecessary.
the-smug-one··on Making Emacs Popular Again (2020)
You use clangd and get it (as part of lsp-mode).
the-smug-one··on Is going to the office a broken way of working?
Uuhm, you're also wrong on life just being "normal". Sweden did have quite a few restrictions, just not as many or as heavy as their neighbors.
the-smug-one··on So You Want to Rust the Linux Kernel?
Yes, we can claim so because there are other ways of proving your program to be safe. See: https://plv.mpi-sws.org/rustbelt/

By the way, several parts of the std (Mutex and Arc for example) are written in unsafe Rust. They have to be, by necessity, because they allow for aliasing and mutation.

the-smug-one··on How to Write a Spelling Corrector (2007)
Could use a Hidden Markov Model, how to implement: https://www.cs.sjsu.edu/~stamp/RUA/HMM.pdf

Here's an impl of some kind: https://github.com/crisbal/hmm-spellcheck

the-smug-one··on How We Went All In on sqlc/pgx for Postgres and Go
I wrote Go for 3 days at my new job and found several places where people opted for interface{} over generics.
the-smug-one··on All you need is call/cc (2013)
Algebraic effect system = Statically typed delimited continuations, as your edit shows :-).

It's dynamically scoped, which is the same as the lexical scope in the untyped lambda calculus. But yes, that is really annoying.

Example from Racket REPL:

> (require racket/control)

> (define f (lambda () (shift k (k 5))))

> (reset (f))

5

the-smug-one··on Rent control isn’t working in Sweden
The state/municipality/region should build more rental apartments. If we can vote for rental control then we can vote to build more apartments too.

How do you get an apartment in Stockholm as a young person? You ask your parents to take out a loan on their house to pay the downpayment, then you take a loan and buy an apartment. Luxurious and high standard apartments are built all the time in Stockholm! The new Barkarbystaden development in the northern municipality of Järfälla will have added 18000 apartments by 2030, the current population is 80000.

Sweden has no issue with building new places to live, as long as they're expensive and luxurious.

Miljonprogrammet wasn't a failure.

the-smug-one··on All you need is call/cc (2013)
The reduction rules copied from Racket's docs:

    (reset val) => val
    (reset E[(shift k expr)]) => (reset ((lambda (k) expr)
                                         (lambda (v) (reset E[v]))))
      ; where E has no reset
E is the current-continuation of the expression, and the comment is an invariant to be held.

And I think call/cc is this:

E[(call/cc k expr)] => ((lambda (k) expr) (lambda (v) E[v]))

So imagine a stack like this:

g

h

call/cc my-fun

this captures the whole stack.

And now imagine:

g

reset

h

shift my-fun

this only captures h (see how it moves the E in the reduction rules and wraps it in reset). So if I try to store k from shift and call it at a later time it won't reach g, but doing the same with call/cc it would reach g.

the-smug-one··on GoKart: A static analysis tool for securing Go code
Go has some nice tooling which is quite easy to use w.r.t. static analysis. I started writing a nil pointer analysis tool which was going to take advantage of and provide some more advanced information*. I "unfortunately" had a lot more fun stuff to do during my vacation, but it was very easy to get started with! So kudos to the Go team for making this kind of stuff possible for a 1-man team.

* Just a forward-style abstract interpretation living on-top of Go's type system as an additional layer so you get explanations for why the tool believes that a nil-pointer dereference may occur, etc.

the-smug-one··on Closing 45% of the open Emacs bugs
They're no longer taking PRs, development has moved over to emacs-ng with a different perspective on how to improve Emacs.
the-smug-one··on Show HN: Lisp implementation in modern Java, Go, C#, TypeScript, Python
Meh, I agree with the parent you're responding to. Calling these toys Lisp just leads to more ignorance in the general public. "Oh, Lisp is so small and elegant" and "Lisp is totally impractical because it's so small" are just blatantly incorrect for any "industrial strength" Lisp produced in the past 40 years. Whether Scheme is a Lisp or not is also an internal debate. Not that it matters much, Scheme is a nice base.

JMC's first Lisp paper had goto in it[0] and was described in terms of the hardware it ran on, is this part of the compact and elegant formalism which you are thinking of?

If you want a compact and elegant formalism then grab the untyped lambda calculus. If you want a Lisp, then at least make something with a GC and macro system.

[0] https://web.archive.org/web/20130319041509/http://www-formal...

the-smug-one··on Knuth on Dijkstra (2014)
Tony Hoare's section was very lovely.
the-smug-one··on The recycling myth: A plastic waste solution littered with failure
Well, the slogan should be something like "Save diverse fauna, flora and funghi which goes through a natural life cycle inside of a vast forest with trees of varying species and ages", but that doesn't fit on a t-shirt :).

Edit: Apparently all living organisms are collectively called "biota", cool.

the-smug-one··on Faster CRDTs: An Adventure in Optimization
Do you want a centralized server to control the data? Then just use OT. Do you want users to control the data, and have your server essentially just be a forever-present user? Then use CRDT.

CRDTs certainly do have a mathematical elegance to them.

the-smug-one··on The fig is an ecological marvel
For what it's worth I love figs. The varied texture, flavour and beauty. To me it's an amazing fruit.
the-smug-one··on Duolingo reaches $6.5B valuation on day of IPO
I use Duolingo to learn Spanish and it's pretty good if you take it seriously and add on research outside of Duo (mostly on grammar). I'm hoping to reach a level where I can read things in the language which are interesting to me (with the aid of a dictionary of course), so I'll probably replace HN with some Spanish variant for example.
the-smug-one··on Why is the university of California dropping the SAT?
In Sweden there is a university exam you can take which functions similarly. You get a curved score between 0.0 and 2.0 with which you can apply to unis with. You can take it however many times you want at a cost of about 80 USD (I think).
the-smug-one··on Teaching other teachers how to teach CS better
Hey, life's complex. I'll never get it right, especially not here on HN :). Thanks for being understanding!
the-smug-one··on Teaching other teachers how to teach CS better
Typically just trying the first few, then going to another in the middle of the course or so to see if things have changed.
← PreviousPage 8 of 11Next →