Better HN
topnewbestaskshowjobs
Log inSign up

codesnik

1,035 karma · joined Mar 11, 2009 (17y ago) · 496 submissions

Submissions

comment 3y ago · link · parent

interesting. Can you expand on Elixir incompatibility? How is it different?

comment 3y ago · link · parent

I wonder if it's possible to wash the sheep with a shampoo or something before the competition.

comment 3y ago · link · parent

I wonder, if processes started in those subshells, even normally terminated, would accumulate without normal init program? I forgot if "reaping" is something special to do.

comment 3y ago · link · parent

I don't get it. How those hypervectors are different from matrices in neural networks? Ok, having not just 0 and 1 for each separate shape and encoding each set of mutually exclusive attributes with just one parameter would make it more compact and fast, probably, but also sounds very limiting, and making it more close to Prolog than to neural networks. We, humans, can deal with "roundish squares".

comment 3y ago · link · parent

sounds interesting, thanks.

comment 3y ago · link · parent

I sometimes ponder, how much effort it would take to make a similar matching interface not for binaries but for regexps and/or something grammar-like. After structured matching of binaries regexps in elixir just feel awkward.

It wouldn't work well with other matching constructs, though, if matching is baked into beamvm itself as a core instruction for speed or something. Guess I have something to investigate this evening.

comment 3y ago · link · parent

some errors there.

  head = 0x00
  piece = <<0x01, 0x01, 0x01, 0x01, 0x01>>
  << head,             # When a variable is already referenced it must be equal for the pattern to match
     piece,            # Match a string
     rest :: binary >> # You can mix matching variables and assigning new variables.
it should have ^head, and ^piece (the term is "pinning"). Unlike in erlang, elixir will happily "reassign" variables to the new content on whatever is on a right side of the match.

comment 3y ago · link · parent

the only use case I can think of for the rocket body 3d printing, combined with methane engines, is a something weird: fly to mars with a 3d printer and some technology to extract iron from the sand and methane from the atmosphere and build multiple rockets there to fly something useful back to Earth. But that's such a big leap of imagination.

comment 3y ago · link · parent

properly done glued wood boards don't have a warping problem, and sometimes are even stronger than whole wooden planks. In fact most of Ikea furniture is made from those, except wardrobes and cupboards, which are not expected to have much pushes from aside.

comment 3y ago · link · parent

interesting point, I've read somewhere that from biodiversity, and carbon sequestration viewpoint some forests (corniferous, like taiga) are much poorer than grass steppes. It was argued that mammoths were important because they were strong enough to fall down trees, making space for grass to grow.

comment 3y ago · link · parent

I yet to understand a reason for cell to be addressed by A1 or C1R1 style. put it in a table, give a column a name. Numbers got it right.

comment 3y ago · link · parent

backtracking isn't hard to implement, though. Depth-first search is more or less what it is. But erlang lost most of the prolog ancestry, backtracking isn't there, for example. BEAM has a lot of concurrency neatness though, hard to reimplement or even mimic in languages not specifically tailored for from ground up.

comment 3y ago · link · parent

I personally don't find this binding once behaviour problematic in any way, but Elixir specifically addresses this (it creates another variable with the same name, though)

comment 3y ago · link · parent

you probably can encode a whole board in a small-ish string, something you can put in a url hash. But chess game is also a history of moves.

comment 3y ago · link · parent

well, you've cleaned something existing and running, and also received some money doing that. Who knows, maybe with uptight approach those things would never happen.

comment 3y ago · link · parent

it seems they really wanted for iphone to think that it in the correct position, like if it was in the user hand. Otherwise placing phone horizontally, flipping image and using some kind of periscope for the camera would make a more compact and much less "dorky" looking device.

Is it supposed to run existing iphone AR apps too?

comment 3y ago · link · parent

hm. Surely SARS-CoV-2 RNA sequence for one virus itself isn't 300gb? does it contain multiple variants or unprocessed and unjoined fragments?

comment 3y ago · link · parent

I've never understood the need for 2d schematic editor when a ordered list of filters would suffice. Do you like to move pixels around that much?

comment 3y ago · link · parent

unnamed as [No Name]? both :wq and ZZ (:x) do the same: "E32: No file name"

comment 3y ago · link · parent

huh. I'm using ZZ all the time, but I thought it is :wq

comment 3y ago · link · parent

well, why not text?

Ruby should work well, it's pretty close to plain english, and is not too heavy on punctuation, and is (mostly) not whitespace sensitive. You'll need some screenreader setup, of course.

Making games is a major hook for kids to go into programming, but there're text games, like zork etc.

comment 3y ago · link · parent

I usually say that microservices are a good concept. Do everything to enable the split of your monolith, then ..don't.

comment 3y ago · link · parent

Took them long enough to add it.

comment 3y ago · link · parent

It doesn't create no scope. Even for variables.

comment 3y ago · link · parent

I've seen his comment somewhere (on reddit?), it's not.

comment 4y ago · link · parent

Whole truck doesn't have to hop on rails. This thing exists: https://en.wikipedia.org/wiki/Roadrailer

comment 4y ago · link · parent

I wonder if anyone considered trucking a swappable battery as well. That's not for semi, of course, but road trains do exist?

comment 4y ago · link · parent

TIL that current working directory is stored with buffer lines. Cool idea.

I've quickly tried to drag and drop file from another directory earlier from the history to the terminal itself, but it was converted to "cd directory" command somehow.

comment 4y ago · link · parent

Wow, thank you. I didn't know about dragging, I always resorted to "open -R" to drag a file to anything GUI.

comment 4y ago · link · parent

they're tired waiting, and "wow"ing in some other direction now.
1
8910
17