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

I haven't even realized that while I was reading the article, but it is amusing!

Though one explanation is that I think for the other stuff that the writer doesn't explain, one can just guess and be half right, and even if the reader guesses wrong, isn't critical to the bug ­— but sockets and capabilities are the concepts that are required to understand the post.

It still is amusing and I wouldn't have even realized that until you pointed that out.


I'm genuinely curious on how well this is working, is there an independent Java test suite that covers major Java 5/6 features that can verify that the JOPA compiler works per the spec? I.e. I see that Claude has wrote a few tests in it's commits, but it would be wonderful if there's a non-Clauded independent test suite (probably from other Java implementations?) that tracks progress.

I do feel that that is pretty much needed to claim that Claude is adding features to match the Java spec.


Well, it's complicated. The original jdk compliance tests are notoriously hard to deal with. Currently I parse nearly 100% of positive testcases from JDK 7 test suite (in one of Java 7 branches) but I only have several dozens of true end to end tests (build .java with jopa, validate classfile with javap, run classfile with javac).

So, I can't tell how good it actually is but it definitely handles reasonably complex source files with generics (something the original compiler was unable to do).

The actual goal of the project is to be able to build at least ANT to simplify clean bootstrap of OpenJDK.


That is perilously close to the usual:

"AI DID EVERYTHING IN A DAY"

"How do you know it works?"

"... it just looks like it does"

Like when I ask AIs to port sed to java, and it writes test cases ... running sed on a CLI and doesn't implement the full lang spec no matter how much prompting I give it.


Well, at least the emitted bytecode validates with javap and a lot of stuff definitely runs on real jvm.


I think the criticisms are too often dismissed as moving the goalposts or ignorant of potential, but short of recreating the active open bugs in Java, you've created a different thing whose differences have to be managed and it is unclear how helpful that may be despite the working implementations of subsets.


If I (or someone else) can use it as a start point in bootstrap process - that's fine with me. This is not supposed to be a top-tier compiler. Essentially, it needs to be able to build ANT.


It is beyond annoying that the article is totally generated by AI. I appreciate the author (hopefully) spending effort in trying to figure out the AI systems, but the obviously-LLM non-edited content makes me not trust the article.


What makes you believe that anything in the article is real?

The author seems to not exist and it's unclear where the data underlying the claims is even coming from since you can't just go and capture network traffic wherever you like.

A little due diligence please.


I knew for a fact that a Linux desktop was a viable option when you have a separate macOS/Windows laptop (which is my main computer). Recently (frustrated with macOS updates), I decided to be Linux-only for a week[0], replacing my MBP with an MBA that runs Asahi Linux.

Unfortunately it turns out that I depend on too many desktop apps that runs on the major desktop OSes but not on Linux (or on Wine, for that matter).

* KakaoTalk, the major South Korean IM app ran on Wine for a week, but the updater doesn't work and freshly reinstalling the app broke Wine for some reason. (I tried removing the whole ~/.wine prefix, but it doesn't work.) Now I'm stuck without KakaoTalk.

* Discord is only provided as a x86_64 Deb file and a .tar.gz file. I tried using it from Firefox, and it works fine but audio sharing during screen sharing doesn't work.

* Disconnecting from my Bluetooth AirPods somehow does not stop my music. I'm not sure if this is an AirPods limitation or a Linux limitation (since I've never used AirPods with Windows), but it annoyed me endlessly.

* USB-C DP mode and the fingerprint sensor doesn't work. This is an Asahi Linux limitation, but I've seen various parts of the hardware not working when using other Linux distributions on laptops as well. I feel this is a common occurrence.

Not to mention that the lack of text editing shortcuts that macOS has, which is a big deal to me (but I tried as that is a macOS-ism).

I carried my MBA for 4 days before I gave up today. I brought my MBP today with me.

[0]: https://news.ycombinator.com/item?id=45940274


> * Disconnecting from my Bluetooth AirPods somehow does not stop my music. I'm not sure if this is an AirPods limitation or a Linux limitation (since I've never used AirPods with Windows), but it annoyed me endlessly.

I think this is by design, not limitation. On android, changing sound device stops music playback. On windows and linux, changing sound device doesn't stop sound. I tried it with wired headphones, maybe expectations for BT are different, but I think that comes from smartphones.


>* USB-C DP mode and the fingerprint sensor doesn't work. This is an Asahi Linux limitation, but I've seen various parts of the hardware not working when using other Linux distributions on laptops as well. I feel this is a common occurrence.

This really is a special case, they've had to write new drivers for everything in the Apple Silicon Macs and they haven't gotten that working yet. I have in fact been waiting on this feature for a few years now as I want to use a MBP with the lid closed and two monitors plugged in, but currently only the HDMI works and not most USB-C functionality. This is not at all the norm in x86_64 land where more normal hardware is used. I'm still using a ThinkPad T440p and thinking about getting a T14 gen 5 due to the MBP I got a few years ago not being satisfying/fun to use, comparatively.

As for Discord and AirPods and such, the more proprietary stuff you need, the worse time you'll have. Though I just saw something in the news that might help with the AirPods. Check out LibrePods.

https://github.com/kavishdevar/librepods


For discord I just use Discord Canary. its a wrapper and works perfectly. But I'm also on Fedora.

I would suggest trying something other then Asahi linux! I know that their support with Mac systems is near unbeatable. But it does still tend to have some hiccups. Especially with M3+ systems.

I know that "try a different distro" is a often (user biased) and imo bad answer. But in the case of Asahi as awesome as their work is they are climbing a different mountain compared to the rest of linux development.


>Discord is only provided as a x86_64 Deb file and a .tar.gz file. I tried using it from Firefox, and it works fine but audio sharing during screen sharing doesn't work. I got it working with the unofficial client Vesktop. Functioning screensharing on wayland is actually advertised as one of their main features.


So why not use the .tar.gz for Discord?


I can't see how this is being blamed to the phone device maker (or the users who have not updated yet), why is Australia phasing out their 3G network if a large swath of their people's phones are dependent on them for dialing their emergency number?

In my view, they (the govt) either should have not gave permission on selling the devices who relies on having a 3G network for emergency calls for at least 10 years ago, or they should just have their 3G network operable for another 5 years.

For example, our country (South Korea) had 2G networks operable until ~2021, and are planning to have all of the 3G networks operable for the foreseeable future. It can be done.


Exactly. I am fairly certain 2G still works in India. Australia is not as populous and has a larger geographical area with low density. I can understand the business wanting to cut costs, but this seems aggressive.


This morning on U.K. breakfast radio they got a Nokia 7110 out from 25 years ago and sent sms and made a phone call, I was amazed it still worked.

(Ok the battery was shagged and it shut down once when it started to make a call, but it eventually worked)


I have recently used my old Nokia 3410 in Poland and the only issue was that it couldn't connect to the Internet via dial-up CSD anymore.


> According to the prevalent narrative in North Korea, the war was won by the communists.

According to the North Korean govt, the Korean war was started by the South who wanted to invade North (it was not, based on extensive studies). Therefore in their view (or at least from their propaganda), the communists "won" by successfully defending their part of the peninsula.


(I'm a South Korean.)

> According to the prevailing narrative in North Korea, the war was won by the communists and since then, the entire Korean peninsula has remained united under the rule of the Korean Workers’ Party.

This is either not true at all or the writer phrased strangely ­— both of the governments (South & North) recognize that the war is still on-going and they have an enemy that is controlling the other half of the peninsula that they do not control. However, both of the governments also argue that they are the only legal government that is ought to control the whole peninsula and does not recognize each other's legitimacy. For example, ROK(Republic of Korea, the government that controls the southern part of the peninsula)'s constitution writes that it's government governs the whole peninsula and it's islands. It's like how both PRC(People's Republic of China, i.e. China) and ROC(Republic of China, i.e. Taiwan) both argue that they are the only legal government over all of China (i.e. Mainland China and Taiwan combined).

> Therefore, when looking at the maps in this atlas, it should come as no surprise that Korea is always shown as one country, with no reference to the other country that exists at the southern tip of the peninsula.

It is universally agreed between the two governments (and their citizens) that a unification should happen at some point, so it is obvious that we should be using a map that covers the whole peninsula. We (as South Koreans) also learn 'our country' as the whole peninsula.

> This North Korean world map is centred on the Pacific Ocean, which gives Korea a privileged position on the global stage.

Not going to lie, sometimes it feels that some of the Westerners act like that they don't even think of the remote possibility that they might not be the center of the world…?

South Korean maps do this, China maps do this, Japanese maps do this, I'm pretty sure South East Asia countries also do this, it's a normal thing to do. There's nothing special about having the Pacific Ocean centered.


>> This North Korean world map is centred on the Pacific Ocean, which gives Korea a privileged position on the global stage.

> Not going to lie, sometimes it feels that some of the Westerners act like that they don't even think of the remote possibility that they might not be the center of the world…?

Westerner who also thought this was a strange comment and that the centering of the Korean peninsula was a totally natural decision for this atlas


> Not going to lie, sometimes it feels that some of the Westerners act like that they don't even think of the remote possibility that they might not be the center of the world…?

> South Korean maps do this, China maps do this, Japanese maps do this, I'm pretty sure South East Asia countries also do this, it's a normal thing to do. There's nothing special about having the Pacific Ocean centered.

Worth noting that florence meridian (11E) is somewhat special because centering map on it avoids cutting any major land masses. The best pacific option (148E) still needs to deal with greenland somehow. Of course Korea is quite off from 148E, so the map here ends up bit wonky (Greenland is duplicated, but Nunavut is not?).


The North has officially rejected unification, and regards South Korea as a separate, enemy country.


Not sure why this is downvoted. Kim Jong-un declared that reunification is no longer a goal in 2024 and tore down the Reunification Arch.


But that's only because the conservative government that took power in South Korea took a hardline anti-unification stance and instead decided to strengthen relations with the US.

The US has a rich history of undermining unification processes. Like in 2005 when Bush Jr broke promises related to light-water reactors and the 2005 agreement (where North Korea would stop nuclear development in exchange for a non-aggression pact and relief from sanctions).

Or in March 2017 when the U.S. has dismissed a joint China-North Korea proposal where North Korea would end its nuclear weapons development in exchange for the U.S. stopping its military maneuvers with South Korea


Yes, that's complete nonsence.

My friend was on a guided tour to North Korea, and they aware of a lot of things. For example, the population of the North and the South was somehow accurately described to the tourists as 25 and 50 million, and they don't question that fact.


> It is universally agreed between the two governments (and their citizens) that a unification should happen at some point, so it is obvious that we should be using a map that covers the whole peninsula. We (as South Koreans) also learn 'our country' as the whole peninsula.

When I was growing up, I learned that too. But is it still true? I don't see any unification news or mention of it from media anymore. I don't think that schools still say or can say that to students. It didn't take me a long time after I got out of the public education system to realize what propaganda schools and media were selling.


>It is universally agreed between the two governments (and their citizens) that a unification should happen at some point

South Koreans don't seriously believe this would ever be possible do they?


All Koreans hope for it to happen, especially those who aren't part of the very upper echelons of the DPRK. Just because folks live in DPRK and are bombarded with bullshit doesn't mean they aren't very well aware of what their realities are like when compared to that of the South.

Sneakernet is (was?) alive and well in DPRK and most of the population knows they're living nowhere near the levels that those in the South are. They just are fucking terrified of them and their families being killed by hard labor if they say otherwise.

So; sure; it's /possible/, but until something big changes, it won't happen. The only reason it's not actually happening is because of the humanitarian crisis it would create. No one wants to deal w/the fallout.


It wouldn't be just a humanitarian crisis but huge economical and social problem as well - suddenly this single country would be enlarged by ~26mln people who would need to be adjusted to life in a completely different reality, and who also would need to be secured in variety of ways.

The comparison to German unification that's often bring up seems to be accurate only on the surface. There are large differences like mainly the cult of personality created by the Kim family that affects life of people in NK. It's not possible to dismantle that day by day, and surely government which would had to deal with unification would also face resistance to some degree. This society has been for over 70 years conditioned to hate, looking for the causes of their own misfortune outside in the pure evil that USA in their eyes is and its puppet state of SK.

It won't be a 0-1 change where on Monday you attend annual parade where you worship Eternal President and Dear Leader, and by Tuesday you plan your first vacations on Jeju island.

Moreover, the situation in the end of 80s in Europe is the key factor - namely the domino effect started in Poland which spread across the whole eastern bloc. There was a strong opposition building up within societies of Central-Eastern Europe demanding changes and freedom. Pretty sure that's nearly non existent in NK - there's no trigger for large changes. Even the famine in the mid-90s wasn't enough.


I don't think much of anyone thinks unification is actually possible absent some big change, and indeed neither government is truly pursuing it actively (unless "trying to destabilize and make the other government collapse" qualifies). But both are trying to be as ready as possible for unification when the opportunity presents itself (most likely, it would happen in a way alike to German reunification - that is, the government of one of the two countries becomes quite compatible with the other, because the previous form of government in it collapsed and was replaced by that of its neighbor)


Nothing lasts forever, and change is an inevitable fact of life on a sufficient time scale.


I mean, see Germany.


( I lived in South Korea, and I read Korean rather well, and have traveled very extensively in South Korea. I have seen North Korean across the borders from 4 sites. )

The prevailing narrative in North Korea is utter propaganda: You cannot win a war that is still not over.

Korea should reunite as some point, when the North has a moderate leader or falls like East Germany. Until then all the wishful thinking of a deranged leader in the North, will amount to cold, cold air. The North Koreans starved millions of their own citizens. Millions, and continue to do so.

"Government Policies: The state's rigid public distribution system failed, disproportionately affecting the urban population and rural areas, while prioritizing food for the military and political elite. The government was slow to seek international aid and restricted the access of foreign relief agencies, diverting much of the aid that did arrive. "

Westerners who are not traveled, do believe themselves to be the center of the universe, its why they are almost universally known as 'Ugly Americans.' Loads of those in South Korea.

An honest map of korea would be east west centered on the China sea, looking over the plains, and with the mountains at the top... ( I am getting emotional now at the thought of the mountains... so incredibly beautiful, and... amazingly clean. ) My wish for Korean Unification is to see the Golden Mountain. (金剛山), and for the long separated families to see each other.

Rotate all these maps 90 degrees counter clockwise.

The best hope for unification for Korea... was laid out by Sec Hillary Clinton, who before she became Secretary of state, basically reiterated verbatim one of the most well thought out assessments of unification I have ever heard. Since she is not exactly a professor of Far East Studies, someone in the State Department must have written it for her, someone who had been studying it for decades, like I have.


Can you provide more details on the early statement by Sec Hillary Clinton? I've been unable to narrow down which communication you are referring to.


North Korea has map centered on North Korea.

Discussion is about how Westerners are self-centered.

OK.


At least for Japan, South Korea and China we all draw our map centered to Pacific Ocean instead of Atlantic Ocean. It is very normal practice, unless the author of this article is so Eurocentrism that they think it is an arrogation for anyone other than Europe to put them in the center.


This article just pushed me over to retry Linux on my laptop, and I've been spending the last 2 hours on a Linux desktop. I would love to use it as my main driver (will try the next week), but it still feels like a thousand paper cuts and realize why I was stuck on macOS for the last 10 years. Ugh :(


Curious what the cuts are? I'm forced to use MBP at $JOB and it sucks compared to Linux at home. Maybe I'm just used to Linux, don't know? But I love the fact that I can configure it the way I like, especially all the keyboard shortcuts. On MacOS this has proven to be difficult.


macOS has two keyboard shortcut management mechanisms. I find it far easier to control keyboard shortcuts on macOS vs Linux. You either can do it in the GUI in Settings > Keyboard > Keyboard shortcuts, either per app or global, or you can use the older KeyBindings method: drop a .dict or a .plist in ~/Library/KeyBindings with your shortcuts in there. See https://web.archive.org/web/20070513170225/http://www.hcs.ha...


This is nice, I agree, but you can't e.g. switch Fn and Ctrl keys this way, afaik.


I don't need the OS to do that because Emacs will do it. I need the OS however to pass fn-N and fn-P to Emacs (instead of the default behavior of interpreting them as Expose shortcuts) and it does not seem possible to configure that without turning off SIP.


It's definitely a different workflow using Linux. If you've been using mac for 10 years you'll have a set of apps that you've bought that might not exactly match.

I found kubuntu to match my expectations from a UI standpoint. The gnome desktop was too different and scattered by comparison.


What kind of hardware did you install it on? And what hardware wasn’t supported? Or was it the software that caused the papercuts?


While I might not think that JS is a good language (for some definition of a good language), to me the provided spec does feel pretty small, considering that it's a language that has to be specified to the dot and that the spec contains the standard library as well.

It has some strange or weirdly specified features (ASI? HTML-like Comments?) and unusual features (prototype-based inheritance? a dynamically-bounded this?), but IMO it's a small language.


Shrugging it off as just being large because it contains the "standard library" ignores that many JS language features necessarily use native objects like symbols or promises, which can't be entirely implemented in just JavaScript alone, so they are intrinsic rather than being standard library components, akin to Go builtins rather than the standard library. In fact, in actual environments, the browser and/or Node.JS provide the actual standard library, including things like fetch, sockets, compression codecs, etc. Even ignoring almost all of those bits though, the spec is absolutely enormous, because JavaScript has:

- Regular expressions - not just in the "standard library" but in the syntax.

- An entire module system with granular imports and exports

- Three different ways to declare variables, two of which create temporal dead zones

- Classes with inheritance, including private properties

- Dynamic properties (getters and setters)

- Exception handling

- Two different types of closures/first class functions, with different binding rules

- Async/await

- Variable length "bigint" integers

- Template strings

- Tagged template literals

- Sparse arrays

- for in/for of/iterators

- for await/async iterators

- The with statement

- Runtime reflection

- Labeled statements

- A lot of operators, including bitwise operators and two sets of equality operators with different semantics

- Runtime code evaluation with eval/Function constructor

And honestly it's only scratching the surface, especially of modern ECMAScript.

A language spec is necessarily long. The JS language spec, though, is so catastrophically long that it is a bit hard to load on a low end machine or a mobile web browser. It's on another planet.


Yeah, a lot of the quirks come from it being small


IMO: Transpilers are compilers, but not all compilers are transpilers.

In my book, transpilers are compilers that consume a programming language and target human-readable code, to be consumed by another compiler or interpreter (either by itself, or to be integrated in other projects).

i.e. the TypeScript compiler is a transpiler from TS to JS, the Nim compiler is a transpiler from Nim to C, and so on.

I guess if you really want to be pedantic, one can argue (with the above definition) that `clang -S` might be seen as a transpiler from C to ASM, but at that point, do words mean anything to you?


For me, the "human-readable" part is key. It's not just that the output is e.g. javascript, but that it is more or less human-readable with about the same organization as the original code.

If you implement SKI combinators, or three-address instructions, as functions in javascript, and that's the output of your compiler, I would not call that a transpiler.


Exactly. For a web dev oriented example, I would call coffeescript a transpiler, since it would transform

    # some comment
    myFun = -> 
       alert 'Hello CoffeeScript!'
into

     // some comment
     var myFun;

     myFun = function() {
         return alert('Hello CoffeeScript!');
     };
clearly intending the output code to be quite readable (even preserving comments).

Whereas Elm is a compiler since it transforms

  module Main exposing (main)

  import Html

  main =
  Html.text "Hello Elm!"
into

  (function(scope){
  'use strict';

  function F(arity, fun, wrapper) {
  wrapper.a = arity;
  wrapper.f = fun;
  return wrapper;
  }

  // about 4000 lines ommitted

  var $author$project$Main$main = $elm$html$Html$text('Hello Elm!');
  _Platform_export({'Main':{'init':_VirtualDom_init($author$project$Main$main)(0)(0)}});}(this));
Clearly not intended for (easy) human consumption.


Would it still count as a transpiler if it minifies the code at the end?

For example, most SCSS workflows I've worked with converert SCSS source code into minified CSS, which is pretty difficult for a human to read. But I think that SCSS => CSS still counts as transpiling.


> Would it still count as a transpiler if it minifies the code at the end?

I would say "yes, but the minimization is an additional step that is not actually a direct part of the transpiling process." :-)

So, a program that does this would not a transpiler by itself, but a program that

- executes a pipeline of which the transpiling is the most important step,

- can also be used as a transpiler by making transpiling the only step in the executed pipeline.


What if the minification is inseparable from the transpiler? Like what if it converts the SCSS into some weird graph representation, applies the transpilation features (variables, mixins, etc) on that graph representation, then converts the graph representation into minified CSS? At no point in the process was it ever human-readable CSS. I don't know enough about the internals of transpilers to know if they actually do anything like this, but one could imagine a hypothetical program that does.

And furthermore, what if you run Prettier on the minified output, turning it into readable CSS? The pipeline as a whole would input SCSS and output formatted CSS and therefore would be considered a transpiler, but the subprogram that does all of the SCSS heavy lifting would input SCSS and output minified SCSS, making it not a transpiler.

P.S. I love your username


What you describe is in my opinion a corner case. The following is just my personal opinion on this topic; it is very easy to argue for a different viewpoint:

I personally think that the central point whether it is a transpiler or not is whether the generated output is in the "spirit" in which the output language was conceived to be written by a human programmer.

So, if the outputted CSS code is in a rather similar "spirit" to how a human programmer would write it (though having possibly lots of traces of being auto-generated), it is a transpiler.

For example, if a transpiler generates hundreds of rules for CSS classes, but humans would solve the problem very differently using CSS code, it is rather not a transpiler, but some program that uses CSS as an output format for the reason that this is the output format that has to be used for technical reasons.

This of course encompasses the case of minified CSS code: hardly any programmer would write minified CSS code in a text editor.

Similarly, I would argue that a "transpiler" that generates highly non-idiomatic C code (i.e. it is "insanely obvious" that the output is not C code in the sense how the C language is "intended" to be used) is not a transpiler, but rather a compiler that uses C as some kind of high-level assembler code for output.

In this sense I would indeed say that some "transpiler" that generates highly non-idiomatic JavaScript code is in my opinion rather a compiler that uses JavaScript as an output format because it is necessary because this is necessary to run the code in the browser. I am of course aware that many programmers do have a different opinion here.

So, I would say a strong rule of thumb to decide transpiler or not transpiler is: if there was a choice to use a different output language than the destination language - would the transpiler use the latter one instead? So, to answer your question

> And furthermore, what if you run Prettier on the minified output, turning it into readable CSS? The pipeline as a whole would input SCSS and output formatted CSS and therefore would be considered a transpiler, but the subprogram that does all of the SCSS heavy lifting would input SCSS and output minified SCSS, making it not a transpiler.

If the goal is clearly to generate idiomatic CSS code that can be well understood by a human programmer, by my stance it clearly is a transpiler. If you, on the hand, create such an example just to find a corner case for "transpiler or not transpiler", I would say it is not.


I can usually read JS generated by TS, but calling the C Nim outputs "human-readable" is very generous considering it flattens most structured control flow to goto. (It's hard to do it otherwise, Nim has to deal with exceptions and destructors but C has neither.)

Classifying Nim as a transpiler also results in weird cases like NLVM[1] which most would consider a compiler even though it is a back-end on the same "level" as Nim's C generator.

[1]: https://github.com/arnetheduck/nlvm


I mean, original Dartmouth BASIC only had if and goto, and was definitely designed as a human readable language.


I can read 6502 machine code raw hex. Now what. ;-)


I'd probably say that "transpiler" is not a very useful word with that definition.


Why is it useless? 'Compiler' denotes the general category, within which exist various sub-categories:

For example, a 'native compiler' outputs machine code for the host system, a 'cross compiler' outputs machine code for a different system, a 'bytecode compiler' outputs a custom binary format (e.g. VM instructions), and a 'transpiler' outputs source code. These distinctions are meaningful.


I can’t see why — I do think that the word does convey some sort of useful meaning with the above definition.


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

Search: