profile
viewpoint

grpc/grpc-web 3860

gRPC for Web Clients

defunkt/coffee-mode 574

Emacs Major Mode for CoffeeScript

jart/asterisk-voicechanger 19

Asterisk module for adjusting pitch of voices

jart/coding-interview-university 4

A complete computer science study plan to become a software engineer.

jart/asterisk-parrot 2

Annoying robot that repeats what you say on the phone

jart/coffee-mode 2

Emacs Major Mode for CoffeeScript

jart/chessy 1

A happy toy chess engine, just for fun :) If you want a proper chess engine, check out Stockfish.

jart/closurecheatsheet 1

Content for http://www.closurecheatsheet.com

jart/aggregate-framework 0

Aggregate Framework是基于DDD和CQRS思想而开发的一个领域驱动框架。其主要目标是方便开发人员运用DDD和CQRS思想来构建复杂的、可扩展的应用系统。该框架提供了最核心的构建块的实现,比如Aggregate、Repository和Event。此外,该框架支持与Spring集成,提供使用annotation的方式让开发人员方便地注册事件及定义事件处理,使用Spring事务管理器管理事务时,支持Unit Of Work模式存储数据。

jart/alien4cloud 0

Application LIfecycle ENablement for Cloud

push eventjart/derasterize

Justine Tunney

commit sha 0d5e06441fa53e9b583fe4c9a8a344d79c9c3202

Remove char16_t type The type doesn't do much, so if it's causing issues it ain't worth it.

view details

push time in 2 months

push eventjart/derasterize

Cs Dvrx

commit sha e90d2acf0f11de596ca08b5fdb417682b0b09155

Added public domain samples for tests

view details

Cs Dvrx

commit sha b055e41c5e56253d83d77c75bcd3059140065cfd

Initial MVP, very interesting to learn from

view details

Cs Dvrx

commit sha c31c20ea4651cfca9e692bdaaa139cfda7905ba0

Replace a missing uchar.h to compile with msys2

view details

Cs Dvrx

commit sha c8440a13027f0b93a96e0adf8f643db7c6d22531

Simple tally script to run basic frequency statistics and allow simple testing

view details

Cs Dvrx

commit sha f86881188b3e1b1b395f6262ac9a6249a7f4530f

Added a Makefile so that linux users will feel more at home :-) The makefile supports test and creating samples from the sample images Also add current best uuart files in 70x20 (selected to fit on most terminals)

view details

Cs Dvrx

commit sha 864b921fe0930971360b27dca47d286a5f64d147

Fixed basicidea.c for msys2 implicit .exe

view details

Cs Dvrx

commit sha 30fc15ffe49451a95d4581afd564ec4e09a1b745

Replaced the politically loaded demo.png with a more neutral and reproducible example Also snake.jpg is a public domain image with fine textures, which helps highlighting the differences.

view details

Cs Dvrx

commit sha c5ca99325a2d024fb73c296ab6474aa555cfcd96

Msys2 binaries for use in Windows 10

view details

Cs Dvrx

commit sha eeed52a1b12224b93350462008f299b87510e40d

Command line flags to specify X and Y size Also added more comments in the code

view details

Cs Dvrx

commit sha 51f37c3fb685e9e07c667057ed54fd2816839171

Fixed path to samples/snake.jpg

view details

Cs Dvrx

commit sha f795021014e2f37cff9755fa08b892418ee3f99d

Completed unicode definitions

view details

Cs Dvrx

commit sha 68de08a3c5a64384f3486dcce5ece351a8b45835

Clarification regarding the copyrights Basically, Justine can do whatever she wants, under the basis of this public commit

view details

Justine Tunney

commit sha 3c13f04d7bf95e837d4075079966efab990ea9bb

Remove GPL encumbered binaries Msys2 links a whole lot of GPLv3/LGPLv3 headers, libraries, and runtimes that we're not authorized to distribute. I'm not in the mood to pay Red Hat for a Cygwin license. I'm concerned that these libraries only link against NTDLL which Microsoft explicitly intends to break. Glibc has a suboptimal track record w.r.t. backwards compatibility. However what's most problematic is that these libraries have needless platform lockin. I've replaced the binaries with Cosmopolitan native builds that'll run on all popular PC operating systems released the last twelve years.

view details

Justine Tunney

commit sha e6af0bdc36734eef6c01ebef28e79c3d1b583585

Update copyright information Thank you CSDVRX for your contributions to this project, the advice you've provided offline, and the copyright grant we now have on file. This decision will benefit our users. Especially the ones who work at big companies, where programmers need to be very strict about making sure that legal notices are propagated into derived works. Having a single owner ensures that their job is as easy as possible, thereby making our project more attractive.

view details

Justine Tunney

commit sha eed77c92c0cce6fb359efe60aa06166d621ef226

Touch up makefile and fix a few minor bugs - Supporting DOS-style flags is tricky, due to UNIX abs paths - Fixed logic error I made earlier w/ sizing flags

view details

push time in 2 months

issue commentdankamongmen/notcurses

ultramegaok demo

This single header only project is really good, and has most of the algorithms you'd need (e.g. tile generator, noise function, etc.) to build the sort of demo I described in my previous comment: https://github.com/nothings/stb

dankamongmen

comment created time in 2 months

issue commentdankamongmen/notcurses

ultramegaok demo

If you want to do a demo, you have to be as extreme as possible.

What I'd like to see happen is derasterize block rendering in 3D with ray tracing of generated surfaces mapped through perlin's noise function inside a 24-bit ANSI UNICODE pseudo-teletypewriter display running on bare metal.

dankamongmen

comment created time in 2 months

issue commentdankamongmen/notcurses

add graphing widgets (histogram etc)

You downvoted me? :cry:

Would a scripted subprocess be sufficient for now? I wrote this just now, for you, since I love your project and want to help it be successful: https://gist.github.com/jart/2b2f1322f08a7a7457128559cdc7683c

With minimal effort, you could incorporate embed this script into your program using the gas .incbin directive and then fork+exec a subprocess. I don't know if you care about pure WIN32 (i.e. no cygwin and msys) but you'd basically have to rewrite the script in c++ to download derasterize and then launch it via CreateProcess() which is fine since it only links KERNEL32.

You could also embed the source code to derasterize (licensed isc), write your own equation lexer/parser, and feed it into the rendering algorithm.

dankamongmen

comment created time in 2 months

MemberEvent

push eventjart/derasterize

Justine Tunney

commit sha ecbd95e3cd375c53157a51247aa7ea8a85714c28

Make functions static It helps the compiler do a better job, particularly GCC.

view details

push time in 2 months

push eventjart/derasterize

Justine Tunney

commit sha 5db3b607d9f2119c0a6ac03f9379511778a1f871

Tune some knobs

view details

Justine Tunney

commit sha bb25fb6e26c82a9907d8d4c7cd33f852e3c10bfa

Make color better

view details

Justine Tunney

commit sha 8deb6e1877f87a1f3e0f56c9d23de830759d8db2

Remove HSV code

view details

push time in 2 months

push eventjart/derasterize

Justine Tunney

commit sha f4ed1212d29fd2bfc7a23f9a2ccf7f6194a4bab4

Initial checkin

view details

push time in 2 months

push eventjart/derasterize

Justine Tunney

commit sha 5bb3cb50af3136cce6d5fd0cf901f12aeedb9d37

Initial checkin

view details

push time in 2 months

push eventjart/derasterize

Justine Tunney

commit sha e0bfed9e7966eef86f1713115a464e146edcfe84

Initial checkin

view details

push time in 2 months

push eventjart/derasterize

Justine Tunney

commit sha 34c642beecc0180e6f21ea842a136cc2ba376e7a

Initial checkin

view details

push time in 2 months

push eventjart/derasterize

Justine Tunney

commit sha bfa87da7e73b8e4aa39d2f494ecf589626b6497a

Initial checkin

view details

push time in 2 months

create barnchjart/derasterize

branch : master

created branch time in 2 months

created repositoryjart/derasterize

created time in 2 months

issue commentdankamongmen/notcurses

add graphing widgets (histogram etc)

Sorry but I can't contribute to projects with GPL runtime libraries.

dankamongmen

comment created time in 2 months

issue commentgoogleapis/google-cloud-java

Does google-cloud-contrib belong in the google-cloud-java BOM?

Another one of the authors of NIO here. I'm fine with a different repo, but agree with @Jean-Philippe-Martin that discoverability is important. NIO offers value since it puts GCS at a customer's fingertips, instantly, via the canonical Java filesystem APIs.

If the repo is moved, then could google-cloud-java continue to show its support by including NIO in its install binaries? That way you guys aren't burdened with NIO-related triaging/review/refactor maintenance toil, but continue to preserve the same level of functionality for your users.

elharo

comment created time in 3 months

issue commentavaneev/avir

AVX doesn't compile

@Ptomaine By default GCC assumes it's building a binary for the AMD K8. Try passing the -march=native flag to the compiler. It enables all the various flags like -mavx2 that your host CPU happens to supports.

Ptomaine

comment created time in 3 months

issue commentdankamongmen/notcurses

monospace wide characters

It's all just a bunch of made up definitions for arbitrary orthographic traditions. Is it worth worry too much about? No. Will it break any data structure we try to design that isn't char? Most likely. As far as east asian widths go, it's probably good enough to just know that if a "W" or a "F" is next to the hex code in the official table, it takes up two columns.

The latency of probing is generally much worse than a system call. Termios only knows about the pseudoteletwriter handle, which could be wrapped in things like GNU Screen, SSH, etc. The only way to get definitive answers concerning what the teletypewriter is doing, is to probe it using in-band signalling.

For example, some tty emulators will tell you what font the user is currently using, so you can check if it's a Good Font [1] and if not, display a warning that blocks and stuff might not line up properly etc.

Also, what is terminfo?

[1] I view the Good Fonts as being: (1) Menlo [only w/ Retina display], (2) PragmaPro, (3) Consolas a.k.a. DejaVu, and (4) Lucida Console.

jart

comment created time in 3 months

issue commentdankamongmen/notcurses

monospace wide characters

Another thing you might want to consider, if you're writing a generalized terminal library, is that Thompson-Pike Encoding permits one to non-canonically encode ASA X3.4-1967 and ANSI X3.64-1979 control sequences. So, for example, if I wanted to defeat a assert(c[i] >= 32 security check in order to reconfigure the serial line driver to your raspberry pi, I would simply emit {0xC0, 0x80+c}.

jart

comment created time in 3 months

issue commentdankamongmen/notcurses

monospace wide characters

wcwidth() will absolutely return values greater than 1, e.g.

  setlocale(LC_ALL, "C.UTF-8"); /* the only locale libc ought to support */
#define DOIT(C)  \
  printf("c=%-*lc x=%#7x w=%zu\n", 2 + !wcwidth(C) * 2, C, C, wcwidth(C));
  DOIT(0x300);
  DOIT('Z');
  DOIT(L'︵');
  DOIT(L'👨');   

Emits:

c=̀   x=  0x300 w=0
c=Z  x=   0x5a w=1
c=︵ x= 0xfe35 w=2
c=👨 x=0x1f468 w=2

If you don't want to depend on libc or libicu for this function, then you can write a script that creates bitmaps from the official unicode text file specs, e.g. https://github.com/latex3/unicode-data/blob/master/EastAsianWidth.txt See also RLE and MADV_MERGEABLE.

jart

comment created time in 3 months

issue commentdankamongmen/notcurses

monospace wide characters

👨‍👩‍👦 → :family_man_woman_boy: looks like a ligature to me, e.g. fl, ff, ffi, ffl, ſt, st, æ, œ. I wouldn't worry too much about abstracting that. char * is a pretty good data structure for text.

jart

comment created time in 3 months

issue openeddankamongmen/notcurses

monospace wide characters

https://github.com/dankamongmen/notcurses/blob/0867e431829fb3bdc133c07dadabb944350382e2/src/lib/notcurses.c#L14

If data structures make cells index'able then please consider that many monospace characters take up multiple cells.

TEST(strwidth, testCjkWidesAndCombiningLowLines_withThompsonPikeEncoding) {
  /*───────────────────────────────────────────────────┬─*/
  EXPECT_EQ(20, strwidth(/**/ "𐌰𐌱𐌲𐌳𐌴𐌵𐌶𐌷▒▒▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strwidth(/**/ "(╯°□°)╯𐄻︵ ̲┻̲━̲┻▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strwidth(/**/ "ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strclen(/*─*/ "𐌰𐌱𐌲𐌳𐌴𐌵𐌶𐌷▒▒▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(22, strclen(/*─*/ "(╯°□°)╯𐄻︵ ̲┻̲━̲┻▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(14, strclen(/*─*/ "ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(68, strlen(/*──*/ "𐌰𐌱𐌲𐌳𐌴𐌵𐌶𐌷▒▒▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(56, strlen(/*──*/ "(╯°□°)╯𐄻︵ ̲┻̲━̲┻▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(42, strlen(/*──*/ "ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, wcswidth(/**/ L"Table flip▒▒▒▒▒▒▒▒▒▒" /*│*/, -1));
  EXPECT_EQ(20, wcswidth(/**/ L"(╯°□°)╯︵ ̲┻̲━̲┻▒▒▒▒▒▒▒" /*│*/, -1));
  EXPECT_EQ(20, wcswidth(/**/ L"ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/, -1));
  EXPECT_EQ(20, wcslen(/*──*/ L"Table flip▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(22, wcslen(/*──*/ L"(╯°□°)╯︵ ̲┻̲━̲┻▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(14, wcslen(/*──*/ L"ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strwidth16(/**/ u"𐌰𐌱𐌲𐌳𐌴𐌵𐌶𐌷▒▒▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strwidth16(/**/ u"(╯°□°)╯𐄻︵ ̲┻̲━̲┻▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strwidth16(/**/ u"ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(20, strclen16(/*─*/ u"𐌰𐌱𐌲𐌳𐌴𐌵𐌶𐌷▒▒▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(22, strclen16(/*─*/ u"(╯°□°)╯𐄻︵ ̲┻̲━̲┻▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(14, strclen16(/*─*/ u"ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(28, strlen16(/*──*/ u"𐌰𐌱𐌲𐌳𐌴𐌵𐌶𐌷▒▒▒▒▒▒▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(23, strlen16(/*──*/ u"(╯°□°)╯𐄻︵ ̲┻̲━̲┻▒▒▒▒▒▒" /*│*/));
  EXPECT_EQ(14, strlen16(/*──*/ u"ちゃぶ台返し▒▒▒▒▒▒▒▒" /*│*/));
  /*───────────────────────────────────────────────────┴─*/
}

created time in 3 months

issue commentdankamongmen/outcurses

Integrate "direct color" / non-indexed 24bit color atop ncurses

@velartrill Lexi, I got a chance to read your blog. Your rendering code works really well. Flicking was the fault of the stdio library. It was dispatching too many system calls, according to strace. Thankfully the C library provides a solution to the difficulties it introduces. open_memstream seems to be just what you need. Give this code a try: https://gist.github.com/jart/b9104dd959f2dd65ecdcb5ce69d332e6 I added a couple more things too, that I hope you'll enjoy, such as variable monospace widths.

dankamongmen

comment created time in 3 months

issue commentdankamongmen/outcurses

Integrate "direct color" / non-indexed 24bit color atop ncurses

I wouldn't waste my time with ncurses. It doesn't do anything. Optimal cursor motion made sense in the days of 300 baud modem connections. But today it can often be harmful since bouncing around like that in your rendering algorithm means non-local memory access patterns that defeat caches and branch predictors. The rest of ncurses is just a second rate gui framework, that'd probably make microsofties gag if they ever saw it. The only things you need are ioctl() to pass the magnum to the kernel that gets you out of icanon, and then \e[y;xH to move the cursor. ANSI X3.64-1979 is nearly as universal as ASCII. Even old MS-DOS and Microsoft Windows support all the essential codes that are needed.

dankamongmen

comment created time in 3 months

issue commentdankamongmen/outcurses

Add some manner of font rendering capability

One thing you could try are DEC double lines, e.g. printf '\e#3hello\n\e#4hello\n'.

dankamongmen

comment created time in 3 months

more