News for hackers. Stuff that matters.

pjtr

Re:Why is F# code so robust and reliable? on Tuesday September 24, 2024 @02:02AM (#41633501)
Is "let-over-lambda" (variable capture / closure) not possible in F#? Is that not a form of implicit dependency injection?
Re:Why is F# code so robust and reliable? on Tuesday September 24, 2024 @02:00AM (#41633494)
This seems fine within a file, but isn't this problematic across files? Now the file order is significant, so not only is the Visual Studio XML project file is an essential part of the language semantics, you also can't organize your files in subdirectories freely? Or did they fix that at some point? How does that scale to larger projects?
Is there a specific reason why Windows is not supported?
I don't think Microsoft invented it:

> On the CDC CYBER, an interlock register is available ... Operation of this interlock register is similar to TEST AND SET

Concurrency in Operating Systems, October 1976 https://www.computer.org/csdl/magazine/co/1976/10/01647182/1...

OBS is very good software, thanks for working on it!

Recording the screen works much better than any other screen recording software I tried. For this use case the preview can be a bit confusing. If the resolution does not match (because of OS 200% scaling for example) going to the settings each time to adjust it is a bit cumbersome; the interactive resizing handles in the preview somehow never helped me. Sometimes one of the reset zoom context menus helps.

Also the "Window source" would be awesome, but is a bit cumbersome to set up every time, and doesn't capture things like menus unfortunately.

It's probably really difficult to improve these things, so they work automagically for dummies like me that know very little about OBS and use only a tiny feature set, without taking making things worse for power users, which are probably happy with things as they are.

Re:Terrain rendering algorithm in less than 20 lines of code on Friday January 03, 2020 @01:16PM (#21948666)
A short article titled "Voxel Landscapes 2D and 3D By Scout/C-Lous" described most of the tricks, but I can't find the text anywhere. A similar article by the same author on another topic I found here https://github.com/ggnkua/Atari_ST_Sources/blob/master/Docs/...
Re:Terrain rendering algorithm in less than 20 lines of code on Friday January 03, 2020 @12:58PM (#21948447)
The one I remember was "voxel.pas by Steven H Don". A Delphi port survived here: http://tothpaul.free.fr/sources.php?dprgrp.voxel

Searching for "voxel" in https://github.com/nickelsworth/swag/ also finds some very similar tiny Turbo Pascal programs.

Re:Terrain rendering algorithm in less than 20 lines of code on Friday January 03, 2020 @12:50PM (#21948352)
Even drawing front-to-back you don't need the y-buffer, if you switch the loops: for x ... for y ...

Another trick I now remember was to interpolate the color values on such a y-segment, to reduce the pixelated look.

Re:Terrain rendering algorithm in less than 20 lines of code on Friday January 03, 2020 @08:29AM (#21945633)
Same with leaning. Add one more line of code and tweak the draw call:

    var ylean = (input.leftright*(i/screenwidth-0.5) + 0.5) * screendata.canvas.height / 4;
    DrawVerticalLine(i, heightonscreen+ylean, hiddeny[i]+ylean, map.color[mapoffset]);
It adds a lot to the "feeling" IMO :)
Re:Terrain rendering algorithm in less than 20 lines of code on Friday January 03, 2020 @07:27AM (#21945318)
There were also tricks to extend this simple rendering algorithm to allow limited rotations around the other two axes, to look up / down slightly (just move everything up / down; also implemented in the demo here) and to "lean" when steering left / right (just move everything up / down proportional to the distance from the center of the screen; not implemented in the demo here, but visible in the 1992 NovaLogic Comanche example GIF).

There were Turbo Pascal versions of this on websites in the 90s I think, but it seems they were lost.

Re:How to undo almost anything with Git (2015) on Tuesday December 24, 2019 @02:55AM (#21870596)
You are correct, thanks.
Re:How to undo almost anything with Git (2015) on Tuesday December 24, 2019 @02:16AM (#21870459)
purge is a third-party extension; it removes untracked files as you wrote.

But ~purge~ prune is also a command of the evolve extension, that is conceptually similar to strip, as GP wrote.

Re:How to undo almost anything with Git (2015) on Tuesday December 24, 2019 @02:11AM (#21870432)
Fortunately "transplant" is just an old extension, so you can just forget entirely about it.

"Graft" copies; "Rebase" moves.

Alternatively just forget about graft also, and use "rebase --keep" to copy.

"Rebase with evolve" is conceptually still rebase.

Mercurial has strip (removes changesets from repository, by default stores a backup). Mercurial does not have purge.

Evolve has ~purge~ prune (marks changesets as obsolete).

Evolve is similar to a git reflog.

Evolve stores more contextual information than the reflog, so Mercurial+Evolve it is safer and easier to undo things than in Git+reflog. Mercurial also pushes some of this contextual information, so even collaborative history rewriting is possible in a safe and easy way, unlike git.

Re:ECMAScript proposal: String.prototype.replaceAll on Sunday December 22, 2019 @05:34AM (#21856360)
I don't understand the reasons. What is the actual problem in this "even-odd problem"?

How do all the other languages that have an equivalent function (Perl quotemeta, PHP preg_quote, Python re.escape, Ruby: Regexp.escape, Java Pattern.quote, C# Regex.Escape, Go QuoteMeta, Rust regex::escape) avoid or deal with this problem?

Re:Unicode Is Awesome on Tuesday December 03, 2019 @01:58AM (#21690508)
Re:.NET Core gRPC on Tuesday September 24, 2019 @02:32AM (#21057144)
Are there options for machine local IPC over pipes in .NET Core?
Re:String Lengths in Unicode on Monday September 09, 2019 @02:00AM (#20915552)
"Python 3’s approach is unambiguously the worst one"

No rationale for this seems to be included in the article.

Re:Fork: A fast and friendly Git client for Mac and Windows on Wednesday July 24, 2019 @03:44AM (#20513086)
I did see the screenshots. That's what triggered my comment. I did not see any branch names. Now I see "nh-scroll-fix" and "origin/fix-simulate-na..." in the conflict dialog, but not in the merge dialog. Branch names seem insufficient anyway though, but it would be a slight improvement I guess.
Re:Fork: A fast and friendly Git client for Mac and Windows on Wednesday July 24, 2019 @01:34AM (#20512596)
Why do merge tools pretend that "their" and "our" or "remote" and "local" are good labels? Can they not show the commit message and hash? Nowadays with history editing often both sides are local and mine.
Re:'My son spent £3,160 in one game' on Tuesday July 16, 2019 @01:59AM (#20447801)
Coffee, religion, cigarettes, facebook, anger
Re:Announcing Rust 1.35.0 on Friday May 24, 2019 @02:06AM (#19998887)
Can't you use this "alternative rust compiler. Capable of building a fully-working copy of rustc" https://github.com/thepowersgang/mrustc and a trusted C++ compiler instead?
Re:Death by PowerPoint: The slide that killed seven people on Tuesday April 16, 2019 @12:19PM (#19674938)
> you're making the same mistake

I assume you mean the "generic you", as it was the article quoting the NASA report that suggested the comparison.

Re:Death by PowerPoint: The slide that killed seven people on Tuesday April 16, 2019 @01:18AM (#19671303)
"there is a huge amount of text, more than 100 words"

"PowerPoint briefing slides instead of technical papers"

Would technical papers have fewer than 100 words?

If people can't be bothered to read 13 slides, what would they do with a technical paper?

If people can't be bothered to make their message clear in slides, how would they create a readable technical paper?

I don't like presentations that consist of "monotonously reading [bullets] as we read along" either. But what does PowerPoint have to do with this? I've seen such presentations done with trendy web tools instead; they don't change anything. I've also read full technical papers written in LaTeX that didn't manage to get their point through the unclear writing (and vaguely misused technical jargon buzzwords).

Re:Death by PowerPoint: The slide that killed seven people on Tuesday April 16, 2019 @12:54AM (#19671231)
So the real slide was actually quite different from the one presented in the article. The article shows various errors not present in the real slide (vaires, e.?g., Ln, hanrd). The real slide also use different font weights and bullet symbols. Was that intentional to give a bad impression, or just really sloppy? Or were those slides cleaned up?
The list of members is here: https://www.wettbewerbszentrale.de/de/institution/mitgliedsc...

It includes for example Audi, BMW, Daimler, Ford, Opel, Volkswagen, the VDA (Verband der Automobilindustrie; German Association of the Automotive Industry) and the VDIK (Verband der Internationalen Kraftfahrzeughersteller; Association of International Motor Vehicle Manufacturers)

VDA members are here: https://www.vda.de/en/association/members.html

VDIK members are here: http://www.vdik.de/members/members.html and include for example Citroën, Fiat, Honda, Hyundai, Jeep, Mitsubishi, Nissan, Peugot, Renault, Saab, Toyota, Volvo...

Re:JSON with Sqlite on Friday March 01, 2019 @01:57AM (#19278504)
Especially for things like Python's embedded SQLite. Packaging and loading an extension module cross-platform with an otherwise pure Python script seems difficult.
Similar Javascript feature existed for a long time:

Link to first occurrence of "pseudo" on page: https://trac.edgewall.org/wiki/TracLinks#/pseudo

Link to last occurrence of "highlight" on page: https://trac.edgewall.org/browser/trunk/trac/htdocs/js/searc...

Re:What's next for SemVer on Tuesday February 12, 2019 @02:36AM (#19141737)
1) In the Windows ecosystem almost every version has 4 parts. (e.g. file headers in exe, dll, assembly etc.) So it's impossible to use semver which only allows 3 parts. This seems like a major unnecessary roadblock.

2) IMO packaging tools should have fields to indicate the versioning scheme they follow, for example:

{ "version": "1.0.0", "version_scheme": "https://semver.org/spec/v2.0.0.html" }

{ "version"="19.02", "version_scheme": "https://calver.org/")

{ "version"="1.0.0.0", "version_scheme": "https://altver.example.org/winver/1.0.0.0.html")

{ "version"="1.0.0.0", "version_scheme": "custom")

Currently the tools pretend to know that "all" versions follow the same scheme. But in reality they just don't and never will.

Maybe also allow a prefix instead, but make it explicit and unmistakable (i.e. not "v1.0.0", but "semver2-1.0.0").

Older »