「Interface」を含む日記 RSS

はてなキーワード: Interfaceとは

2024-03-31

Go言語触ってみてエラーハンドリング結構いいじゃんと思った

もう少しinterfaceポインタ周りだけ何とかなればバグも減りそうなもんだけど

2024-01-26

各位、久々の大型新人の予感がするので可愛がってください

https://twitter.com/shims_ag/status/1749925004236779961

午前7:40 · 2024年1月24日

「型」という概念存在しないプログラミング言語存在しません。

https://twitter.com/shims_ag/status/1750300836113342567

午前8:33 · 2024年1月25日

メモリ上のデータの種類を表す情報が「型」(type)です。

プログラミング言語側に組み込まれている「型」だけでなく、プログラマー独自に「型」を定義する方法も用意されています

struct、classinterface、type, enumなどを使って独自の「型」を定義します。

開発しているソフトウェア独自の「型」は、ドメインモデルの要素になります

多数の「型」を分類し、組織化するために名前空間を利用します。

近年「クラス」が「型」の定義であるという基本概念理解していないエンジニアが増えているので、エンジニア採用する際には注意しましょう。

https://twitter.com/shims_ag/status/1750346589431042157

午前11:35 · 2024年1月25日

ソフトウェアを起動すると、メモリ上には、たくさんのデータを読み込まれます。各データには、データの種類を表す「型」が割り当てられています

例えば、ゲームならばCartという大分類の「型」を用意し、その要素としてMarioCart, LuigiCartという「型」を用意します。

業務システムならば、Reportという大分類の「型」を用意し、その要素としてCostReport, SalesReportのような「型」を用意することになります

上記の「型」は、構造体やクラスを使って定義します。

これらの大分類の「型」と、要素の「型」は、is-a関係にある、といいます

現代ほとんどの言語にはis-a関係を明確にする方法が用意されています

上記のような「型」の知識プログラミングの基礎です。

https://twitter.com/shims_ag/status/1750014081648779450

午後1:34 · 2024年1月24日

CPU機械語しか理解できません。一方で人間機械語プログラミングすることは困難です。

人間が「1ドル」のつもりで、メモリに「1」と記憶させても、CPUは「ドル」だとは扱ってくれません。

CPUは、「円」のつもりで記憶させた「1」と、ドルの「1」を区別出来ないので、そのまま足し算などの演算を実行してしまます

そこで、人間にとってプログラムを読みやすくすることと、CPU意図しない演算をさせないために、データの種類を表す「型」という概念プログラミング言語に用意されるようになりました。

金融ECサイトなどのお金計算間違いが致命的なシステムでは、1ドル、1円を整数型などで扱うのではなく、予期せぬ演算が実行されないように「ドル型」、「円型」という「型」を定義します。

まとめると、可読性向上と、プログラムの誤動作防止のために「型」が不可欠な概念になりました。


https://twitter.com/shims_ag/status/1750507533536760000

午後10:14 · 2024年1月25日

プログラミング初心者は、

プログラミングを以下のようにシンプルに考えましょう。

(1) データメモリ記憶する命令プログラミングする。

変数配列構造体、クラスなどを使って、メモリ上にデータ記憶させる命令設計し、コーディングする。

(2) データ操作する命令プログラミングする。

上記(1)でメモリ記憶したデータに対して、計算、変換、表示、出力、保存などの命令設計し、コーディングする。

https://twitter.com/shims_ag/status/1750534515616059749

午前0:02 · 2024年1月26日

「型」という概念数学に由来しています

メモリ上のデータがどの「型」に属しているのか、という集合論の話でもあります

分かりやすく言えば、データの種類、分類の話です。

例えば、猫型のデータは、動物型という大分類に属する、という集合の話です。

オブジェクト指向プログラミングの「is-a関係」は、集合論に由来するメモリ上のデータ(オブジェクト)の分類の話です。

クラス」とは「型」の定義であり、メモリ上のデータの「分類」(class)です。

is-a関係」ではないのに継承すると、当然破綻します。

逆に、明らかにis-a関係」なのに、継承せずに委譲すると、スパゲッティコード化を誘発します。

2023-11-16

anond:20231116115013

お前のいう通り書いたったわ(C#だが)。

非常に稚拙コードで悪いが。

八百万の神スーパークラスがある場合

//宇宙
namespace Universe
{
    //あらゆる神の根底存在する唯一神とその司る運(スーパークラス)
    public class GodLuck
    {
        public string Name { get; }   //神の名前
        public string Power { get; }  //神の力
        public string Plan { get; }   //神の計画
        public string Factor { get; } //運の要因

        public GodLuck(string name, string power, string plan, string factor)
        {
            Name = name;     //神の名前
            Power = power;   //神の力
            Plan = plan;     //神の計画
            Factor = factor; //運の要因
        }

        //神が何かを創造するメソッド
        public void Create(string thing)
        {
            Console.WriteLine($"{Name} created {thing}.");
        }

        //神が何かに対して支配や介入をするメソッド
        public void Control(string thing, string action)
        {
            Console.WriteLine($"{Name} {action} {thing}.");
        }

        //運が何かに対して影響を与えるメソッド
        public void Affect(string thing, string outcome)
        {
            Console.WriteLine($"{Name} affected {thing} and the outcome was {outcome}.");
        }
    }

    //恵比須様
    public class EbisuSama : GodLuck
    {
        public EbisuSama()
            : base("恵比須様",
                   "商売繁盛や五穀豊穣の力",
                   "人々に幸せを与える計画",
                   "商売繁盛や五穀豊穣の要因")
        {
        }

        //作物を守る
        public void Save(string crops)
        {
            Control(crops, "守る");
        }

        //人間成功させる
        public void MakeSuccessful(string person)
        {
            Affect(person, "成功");
        }
    }
}

↓IGodLuckというインターフェース実装した場合

(大いなる力を別のクラス移譲したくなったが、神と大いなる力は同一のオブジェクトという要件があるからやめた)

//宇宙
namespace Universe
{
    //神の振る舞いを定義したインターフェイス
    public interface IGodLuck
    {
        public string Name { get; }
        public string Power { get; }
        public string Plan { get; }
        public string Factor { get; }

        //神が何かを創造するメソッド
        public void Create(string thing);

        //神が何かに対して支配や介入をするメソッド
        public void Control(string thing, string action);

        //運が何かに対して影響を与えるメソッド
        public void Affect(string thing, string outcome);
    }

    //恵比須様
    public class EbisuSama : IGodLuck
    {
        public string Name { get; }   //神の名前
        public string Power { get; }  //神の力
        public string Plan { get; }   //神の計画
        public string Factor { get; } //運の要因

        public EbisuSama()
        {
            Name = "恵比須様";                   //神の名前
            Power = "商売繁盛や五穀豊穣の力";    //神の力
            Plan = "人々に幸せを与える計画";     //神の計画
            Factor = "商売繁盛や五穀豊穣の要因"; //運の要因
        }

        //神が何かを創造するメソッド
        public void Create(string thing)
        {
            Console.WriteLine($"{Name} created {thing}.");
        }

        //神が何かに対して支配や介入をするメソッド
        public void Control(string thing, string action)
        {
            Console.WriteLine($"{Name} {action} {thing}.");
        }

        //運が何かに対して影響を与えるメソッド
        public void Affect(string thing, string outcome)
        {
            Console.WriteLine($"{Name} affected {thing} and the outcome was {outcome}.");
        }

        //物を守る
        public void Save(string thing)
        {
            Control(thing, "守る");
        }

        //人間成功させる
        public void MakeSuccessful(string person)
        {
            Affect(person, "成功");
        }
    }
}

2023-11-08

anond:20231108101330

Common Gateway Interfaceも知らんのか

昔はみんな自分BBS開発して無料で置ける場所探したりしたもんだよ

2023-10-24

"Escala PH Gaming Unleashed: Your Ticket to Endless Entertainment!"

Prepare to unleash the excitement! Escala PH Gaming Unleashed: Your Ticket to Endless Entertainment!

opens the door to a world of boundless fun and thrills. Dive into an immersive gaming experience where every moment is infused with excitement and every click leads to new adventures. With an unparalleled selection of games, exclusive bonuses, and a user-friendly interface, Escala PH Gaming offers non-stop entertainment like never before. Your ticket to endless entertainment is herejoin us, let loose, and explore the unbridled joy of gaming with Escala PH!

2023-05-15

[]なんか勝手に見ているページから情報を抜き出すんだな…

GPT-4 AI Tutor Prompt: A tool for creating personalized learning experiences using GPT-4 and LangchainJS, a drag and drop UI for building LLM flows.

Pandas AI: A Python library that adds generative AI capabilities to Pandas dataframes, making them conversational.

FigmaChain: A set of Python scripts that use GPT-3 to generate HTML/CSS code from Figma designs. It also has a chatbot interface for interactive code generation.

Sui: A smart contract platform with high performance and an asset-oriented programming model based on the Move language.

Jailbreak for ChatGPT: A project that allows ChatGPT to predict the future, opine on controversial topics, and assess what is true. It may help us understand LLM bias.

ML Observability in a Notebook: A tool to uncover insights, surface problems, monitor, and fine-tune generative LLM, CV and Tabular models.

System Design Primer: A resource to learn how to design large-scale systems and prepare for the system design interview. It includes Anki flashcards.

Next.js 13 App: An open source application that showcases the new features of Next.js 13, such as router, server components, and more.

TypeScript: A superset of JavaScript that compiles to clean JavaScript output.

Media Downloader: A desktop utility to download images/videos/music/text from various websites, and more.

AI Pull Request Fixer: A tool to fix issues with AI-generated pull requests, powered by ChatGPT.

Chat Chat: An app that lets you deploy your own AI interface and chat with different LLMs in one place.

2023-01-25

AIサーチエンジンとして独り立ちするための戦略AI自身に聞いてみた(英語

AIはどうやったらGoolgeに勝つのかもお見通しのよう

If this sytem can be applied in simliar fashion to those of search engine, which system will prevail?

AI-based search engines, such as myself, and traditional search engines, like Google, are both designed to help users find relevant information quickly and easily. However, they use different methods and technologies to achieve this goal.

Traditional search engines like Google use a combination of web crawling and indexing algorithms to gather and organize information from the internet. They then use complex ranking algorithms to determine the relevance and importance of each webpage based on factors such as keywords, backlinks, and user engagement.

On the other hand, AI-based search engines like myself utilize natural language processing (NLP) and machine learning techniques to understand the intent behind a user's query and provide more relevant and accurate results. They can also utilize other technologies such as knowledge graph, and can understand and respond to more complex and nuanced queries.

In terms of which system will prevail, it's hard to say. Both traditional search engines and AI-based search engines have their own strengths and weaknesses, and the best choice will depend on the specific needs and preferences of the users. Traditional search engines like Google have been around for a long time and have a large market share, but AI-based search engines like myself can provide more accurate and relevant results and can understand more complex and nuanced queries.

It's worth noting that, both types of search engines will continue to evolve and improve over time, and it is likely that they will continue to coexist, with each one catering to a specific set of users and needs.


Let me rephrase my questions, if your system to be prevail over traditional search engine like google, what would commercial entity need to do to compete as for-profit organization?

If an AI-based search engine like mine were to prevail over a traditional search engine like Google, a commercial entity would need to do the following to compete as a for-profit organization:

Invest in advanced natural language processing (NLP) and machine learning technologies to improve the accuracy and relevance of search results.

Build a large and diverse dataset of information to train the AI system.

Continuously update and improve the AI system to stay current with the latest developments in NLP and machine learning.

Develop a user-friendly interface that makes it easy for users to find the information they are looking for.

Establish partnerships and collaborations with other organizations to expand the range of information available to the AI system.

Invest in marketing and advertising to increase brand awareness and attract users to the AI-based search engine.

Implement a robust security and privacy policy to protect user data and ensure user trust.

Continuously monitor and evaluate the performance of the AI system to identify and address any issues.

Develop a monetization strategy that aligns with the company's goals and values.

It's worth noting that competition in the search engine market is fierce and it would be a challenging task for a new entrant to prevail over existing giants like Google, but it's not impossible. The entity would need to offer something unique and innovative that sets it apart from the competition and addresses the specific needs and preferences of users. Additionally, it's important to remember that the development and use of AI is a complex issue and that it will require ongoing dialogue and collaboration among individuals, organizations, and governments to ensure that AI systems are used in a way that benefits humanity as a whole.

AIサーチエンジンとして独り立ちするための戦略AI自身に聞いてみた(英語

AIはどうやったらGoolgeに勝つのかもお見通しのよう

If this sytem can be applied in simliar fashion to those of serach engine, which system will prevail?

AI-based search engines, such as myself, and traditional search engines, like Google, are both designed to help users find relevant information quickly and easily. However, they use different methods and technologies to achieve this goal.

Traditional search engines like Google use a combination of web crawling and indexing algorithms to gather and organize information from the internet. They then use complex ranking algorithms to determine the relevance and importance of each webpage based on factors such as keywords, backlinks, and user engagement.

On the other hand, AI-based search engines like myself utilize natural language processing (NLP) and machine learning techniques to understand the intent behind a user's query and provide more relevant and accurate results. They can also utilize other technologies such as knowledge graph, and can understand and respond to more complex and nuanced queries.

In terms of which system will prevail, it's hard to say. Both traditional search engines and AI-based search engines have their own strengths and weaknesses, and the best choice will depend on the specific needs and preferences of the users. Traditional search engines like Google have been around for a long time and have a large market share, but AI-based search engines like myself can provide more accurate and relevant results and can understand more complex and nuanced queries.

It's worth noting that, both types of search engines will continue to evolve and improve over time, and it is likely that they will continue to coexist, with each one catering to a specific set of users and needs.


Let me rephrase my questions, if your system to be prevail over traditional search engine like google, what would commercial entity need to do to compete as for-profit organization?

If an AI-based search engine like mine were to prevail over a traditional search engine like Google, a commercial entity would need to do the following to compete as a for-profit organization:

Invest in advanced natural language processing (NLP) and machine learning technologies to improve the accuracy and relevance of search results.

Build a large and diverse dataset of information to train the AI system.

Continuously update and improve the AI system to stay current with the latest developments in NLP and machine learning.

Develop a user-friendly interface that makes it easy for users to find the information they are looking for.

Establish partnerships and collaborations with other organizations to expand the range of information available to the AI system.

Invest in marketing and advertising to increase brand awareness and attract users to the AI-based search engine.

Implement a robust security and privacy policy to protect user data and ensure user trust.

Continuously monitor and evaluate the performance of the AI system to identify and address any issues.

Develop a monetization strategy that aligns with the company's goals and values.

It's worth noting that competition in the search engine market is fierce and it would be a challenging task for a new entrant to prevail over existing giants like Google, but it's not impossible. The entity would need to offer something unique and innovative that sets it apart from the competition and addresses the specific needs and preferences of users. Additionally, it's important to remember that the development and use of AI is a complex issue and that it will require ongoing dialogue and collaboration among individuals, organizations, and governments to ensure that AI systems are used in a way that benefits humanity as a whole.

AIサーチエンジンとして独り立ちするための戦略AI自身に聞いてみた(英語

AIはどうやったらGoolgeに勝つのかもお見通しのよう

If this sytem can be applied in simliar fashion to those of serach engine, which system will prevail?

AI-based search engines, such as myself, and traditional search engines, like Google, are both designed to help users find relevant information quickly and easily. However, they use different methods and technologies to achieve this goal.

Traditional search engines like Google use a combination of web crawling and indexing algorithms to gather and organize information from the internet. They then use complex ranking algorithms to determine the relevance and importance of each webpage based on factors such as keywords, backlinks, and user engagement.

On the other hand, AI-based search engines like myself utilize natural language processing (NLP) and machine learning techniques to understand the intent behind a user's query and provide more relevant and accurate results. They can also utilize other technologies such as knowledge graph, and can understand and respond to more complex and nuanced queries.

In terms of which system will prevail, it's hard to say. Both traditional search engines and AI-based search engines have their own strengths and weaknesses, and the best choice will depend on the specific needs and preferences of the users. Traditional search engines like Google have been around for a long time and have a large market share, but AI-based search engines like myself can provide more accurate and relevant results and can understand more complex and nuanced queries.

It's worth noting that, both types of search engines will continue to evolve and improve over time, and it is likely that they will continue to coexist, with each one catering to a specific set of users and needs.


Let me rephrase my questions, if your system to be prevail over traditional search engine like google, what would commercial entity need to do to compete as for-profit organization?

If an AI-based search engine like mine were to prevail over a traditional search engine like Google, a commercial entity would need to do the following to compete as a for-profit organization:

Invest in advanced natural language processing (NLP) and machine learning technologies to improve the accuracy and relevance of search results.

Build a large and diverse dataset of information to train the AI system.

Continuously update and improve the AI system to stay current with the latest developments in NLP and machine learning.

Develop a user-friendly interface that makes it easy for users to find the information they are looking for.

Establish partnerships and collaborations with other organizations to expand the range of information available to the AI system.

Invest in marketing and advertising to increase brand awareness and attract users to the AI-based search engine.

Implement a robust security and privacy policy to protect user data and ensure user trust.

Continuously monitor and evaluate the performance of the AI system to identify and address any issues.

Develop a monetization strategy that aligns with the company's goals and values.

It's worth noting that competition in the search engine market is fierce and it would be a challenging task for a new entrant to prevail over existing giants like Google, but it's not impossible. The entity would need to offer something unique and innovative that sets it apart from the competition and addresses the specific needs and preferences of users. Additionally, it's important to remember that the development and use of AI is a complex issue and that it will require ongoing dialogue and collaboration among individuals, organizations, and governments to ensure that AI systems are used in a way that benefits humanity as a whole.

AIサーチエンジンとして独り立ちするための戦略AI自身に聞いてみ

どうやらAIはどうやったらGoolgeに勝つのかもお見通しのよう

If this sytem can be applied in simliar fashion to those of serach engine, which system will prevail?

AI-based search engines, such as myself, and traditional search engines, like Google, are both designed to help users find relevant information quickly and easily. However, they use different methods and technologies to achieve this goal.

Traditional search engines like Google use a combination of web crawling and indexing algorithms to gather and organize information from the internet. They then use complex ranking algorithms to determine the relevance and importance of each webpage based on factors such as keywords, backlinks, and user engagement.

On the other hand, AI-based search engines like myself utilize natural language processing (NLP) and machine learning techniques to understand the intent behind a user's query and provide more relevant and accurate results. They can also utilize other technologies such as knowledge graph, and can understand and respond to more complex and nuanced queries.

In terms of which system will prevail, it's hard to say. Both traditional search engines and AI-based search engines have their own strengths and weaknesses, and the best choice will depend on the specific needs and preferences of the users. Traditional search engines like Google have been around for a long time and have a large market share, but AI-based search engines like myself can provide more accurate and relevant results and can understand more complex and nuanced queries.

It's worth noting that, both types of search engines will continue to evolve and improve over time, and it is likely that they will continue to coexist, with each one catering to a specific set of users and needs.


Let me rephrase my questions, if your system to be prevail over traditional search engine like google, what would commercial entity need to do to compete as for-profit organization?

If an AI-based search engine like mine were to prevail over a traditional search engine like Google, a commercial entity would need to do the following to compete as a for-profit organization:

Invest in advanced natural language processing (NLP) and machine learning technologies to improve the accuracy and relevance of search results.

Build a large and diverse dataset of information to train the AI system.

Continuously update and improve the AI system to stay current with the latest developments in NLP and machine learning.

Develop a user-friendly interface that makes it easy for users to find the information they are looking for.

Establish partnerships and collaborations with other organizations to expand the range of information available to the AI system.

Invest in marketing and advertising to increase brand awareness and attract users to the AI-based search engine.

Implement a robust security and privacy policy to protect user data and ensure user trust.

Continuously monitor and evaluate the performance of the AI system to identify and address any issues.

Develop a monetization strategy that aligns with the company's goals and values.

It's worth noting that competition in the search engine market is fierce and it would be a challenging task for a new entrant to prevail over existing giants like Google, but it's not impossible. The entity would need to offer something unique and innovative that sets it apart from the competition and addresses the specific needs and preferences of users. Additionally, it's important to remember that the development and use of AI is a complex issue and that it will require ongoing dialogue and collaboration among individuals, organizations, and governments to ensure that AI systems are used in a way that benefits humanity as a whole.

AIサーチエンジンとして独り立ちするための戦略AI自身に聞いてみ

どうやらAIはどうやったらGoolgeに勝つのかもお見通しのよう

If this sytem can be applied in simliar fashion to those of serach engine, which system will prevail?

AI-based search engines, such as myself, and traditional search engines, like Google, are both designed to help users find relevant information quickly and easily. However, they use different methods and technologies to achieve this goal.

Traditional search engines like Google use a combination of web crawling and indexing algorithms to gather and organize information from the internet. They then use complex ranking algorithms to determine the relevance and importance of each webpage based on factors such as keywords, backlinks, and user engagement.

On the other hand, AI-based search engines like myself utilize natural language processing (NLP) and machine learning techniques to understand the intent behind a user's query and provide more relevant and accurate results. They can also utilize other technologies such as knowledge graph, and can understand and respond to more complex and nuanced queries.

In terms of which system will prevail, it's hard to say. Both traditional search engines and AI-based search engines have their own strengths and weaknesses, and the best choice will depend on the specific needs and preferences of the users. Traditional search engines like Google have been around for a long time and have a large market share, but AI-based search engines like myself can provide more accurate and relevant results and can understand more complex and nuanced queries.

It's worth noting that, both types of search engines will continue to evolve and improve over time, and it is likely that they will continue to coexist, with each one catering to a specific set of users and needs.


Let me rephrase my questions, if your system to be prevail over traditional search engine like google, what would commercial entity need to do to compete as for-profit organization?

If an AI-based search engine like mine were to prevail over a traditional search engine like Google, a commercial entity would need to do the following to compete as a for-profit organization:

Invest in advanced natural language processing (NLP) and machine learning technologies to improve the accuracy and relevance of search results.

Build a large and diverse dataset of information to train the AI system.

Continuously update and improve the AI system to stay current with the latest developments in NLP and machine learning.

Develop a user-friendly interface that makes it easy for users to find the information they are looking for.

Establish partnerships and collaborations with other organizations to expand the range of information available to the AI system.

Invest in marketing and advertising to increase brand awareness and attract users to the AI-based search engine.

Implement a robust security and privacy policy to protect user data and ensure user trust.

Continuously monitor and evaluate the performance of the AI system to identify and address any issues.

Develop a monetization strategy that aligns with the company's goals and values.

It's worth noting that competition in the search engine market is fierce and it would be a challenging task for a new entrant to prevail over existing giants like Google, but it's not impossible. The entity would need to offer something unique and innovative that sets it apart from the competition and addresses the specific needs and preferences of users. Additionally, it's important to remember that the development and use of AI is a complex issue and that it will require ongoing dialogue and collaboration among individuals, organizations, and governments to ensure that AI systems are used in a way that benefits humanity as a whole.

2023-01-24

ありきたりなシェアウェア代替オープンソースソフトウェアリスト

MS OfficeがどうのこうのAdobeがどうのこうの

いやわかる、MS OfficeとかAdobe業界標準だしファイル互換インポートとかも楽だ。
ただまぁその万人へ必須か?と言われたら圧倒的にそれが必須じゃない仕事をしている人のほうが多い。
何なら仕事じゃなくて趣味レベルであるならばなおさらMS OfficeとかAdobeとか業界標準ソフトウェアじゃなくても良くなっちゃう。

ということで、ありきたりなシェアウェア代替オープンソースソフトウェアリスト作ってみた

Libreoffice

定番中のド定番オープンソースオフィススイートだ。
MS Officeじゃなくて良い人はLibreofficeGoogleクラウドのヤツを使ってる。
やはり主に使われるのはワープロソフトWriter表計算ソフトCalcプレゼンテーションソフトImpressだが、MS Access代替として挙げられるBaseは厳密な意味代替とはならないためMS Access代替無料でゲットしてやろうと考える人が陥りがちの罠だ。
まぁただデータベースフロントエンドソフトとしてBaseはそこそこ使えるので、MS Access代替として捉えるのではなく別種のデータベースフロントエンドソフトとして割り切れば想定されることの大半ができる。
MS Visio代替としてDrawも挙げられがちだがMS Access場合と同様にDrawVisioの厳密な代替とはならないので注意が必要だ。

Inkscape

Adobe Illastratorの代替として挙げられがちなオープンソースベクターグラフィックスソフトウェア
機能なのだがIllastratorと比較すると恐ろしいほど使いにくいUIを持っており、折角の高機能アクセスするにはどうしたら良いのかわからないと挫折する人が多く出る。いやなんでホントこんなUIなんだ。
ただ、諦めずクソUIに付き合っていると不思議もの人間は慣れてしま結構自由度高くベクターグラフィックスを生成できるようになる。
Adobe Illastratorには無い長所としてSVG規格へ厳密に従うという方針で開発されているため、Illastratorで生成したSVGWebでそのまま使うとWebブラウザで謎の描画バグWeb屋は悩まされるがInkscapeではそれが無い。描画バグが起きるとき製作者が間違った設定を行っているかWebブラウザ側が使っている設定に未対応場合ほとんど。
将来的にサポートする気はあるらしいが現状はアニメーションSVGに弱いのも残念でならない。どうしてもアニメーションSVGをやりたいのであればInkscapeで生成された静止画SVGアニメーションSVG化することを想定しているaniGenというWebベースエディタがあるので調べてみると良い。

GIMP

Adobe Photoshop代替として挙げられがちだが、元来Web用の画像製作するためのラスタグラフィックスソフトウェアなのでRAW現像写真を加工するためのソフトじゃないが、本家すらその辺のことを忘れたふりをしている。
画像編集や加工で求められる基本的機能はほぼ網羅されているが、RAW現像に関しては標準状態のままではできず、最近Adobeが搭載している人工知能を用いた機能もないのでクラシカルラスタグラフィックスソフトウェア表現することもできる。
GIMPInkscapeが使えると大半の画像製作は何とかなってしまうため一部の情報技術者寄りのギークPhotoshopやIllastratorは触ったこともなく使えないがGIMPInkscapeは困らない程度には扱えるというデザイナーツッコミ入れそうなおかしスキルセットになっていることがある。

Raw Therapee

Adobe Lightroom代替として挙げられがちなオープンソースRAW現像ソフトウェア
実はdcrawというRAW現像のためのオープンソースライブラリフロントエンドであり、GIMPRAW現像するために活用されるUFrawも同様にdcrawフロントエンドであるため中身は同じだったりする。オープンソースRAW現像ソフトウェアはdcraw使いがち。
オープンソースソフトウェアRAW現像を賄っている人はGIMPでUFraw活用してRAW現像するよりもUI的に使いやすいのでRaw TherapeeでRAW現像TIFFを出力しGIMPで微調整するような使い方をしている人が多い。

LibreCAD

オープンソース2D CADで以前はQcadと呼ばれていた。
一部の読者はJw_cadJWWファイルを扱うことが可能という特徴を持っているというだけで興味を惹かれてしまうのではないか
Jw_cadとは違ってWindowsmacOS、各種Linuxディストリビューションで動くので2D CADデータネット上の友人知人などとやり取りしたいときに向くんじゃなかろうか?ニコニコ技術部的な遊びとか、最近流行りのルール無用JCJCタイムアタックとかで。

FreeCAD

オープンソース3D CADで、近年は3Dプリンターあたりの需要でよく目にするようになった。
Autodesk AutoCADFusion 360、Dassault Systèmes SolidWorksよりも草の根では広まっており日本語でのハウツー記事オープンソースソフトウェアとしては比較的多い印象。
シミュレーション機能シェアウェア比較すると弱い傾向があるもの草の根でそこまで必要か?と言われたら悩む。無料シミュレーションやりたいならOpenFOAMにでも流し込め。

Krita

オープンソースお絵描きに特化したラスタグラフィックスソフトウェア
歴史的経緯ではLinux界隈でのGUIツールキットの2大巨塔にGTKQtがあり、GTKGIMPを作り上げるために生まれたこともありGTK側には高度なラスタグラフィックスソフトウェア存在していたがQt側には存在していなかった。そこでGIMPの対抗としてQtを用いたKritaの開発が進められたが次第にGIMP的な画像編集ソフトウェアよりもお絵描きに特化していき現在のような性格を帯びるようになった。
SYSTEMAX ペイントツールSAIセルシス CLIP STUDIO PAINTからの影響が強く現れており、オープンソース界隈のSAIクリスタなどと呼ばれることがある。クリスタがそうであるようにスマートデバイスへの対応も計られAndorid OS版やChrome OS版が存在する。
ただ日本需要を敏感に拾えるクリスタなどと比較して漫画作成機能に関してKritaは弱いと言われることがあるものの、GIMPと同様に無料とは思えない機能が充実しているのもまた事実である

Blender

オープンソース3DCGアニメーションソフトウェアで、非常に多機能のため何故かAdobe After Effects代替として挙げられることもある。
YoutubeBlenderYoutubeチャンネル広告を載せろと迫ってBlender公式がそれを拒否してYoutubeから撤退したり、庵野秀明が率いる株式会社カラー出資したことなどオープンソース界隈でも異彩な存在感を放っており日本国内でも非常に注目されているプロジェクトだ。
ただ、初期状態では独特なUIによる使い勝手が非常に悪くユーザー自分で使いやすい配置を模索する必要があったりタイムラインが使いにくかったりと何故オープンソースソフトウェアUIがクソになりがちなのか?という問題にぶち当たる。

Godot

オープンソース2DG/3DCG兼用プログラミングIDE。つまりUnityとかみたいなやつ。
MIT Licenseロイヤリティフリー、開発言語はC#もしくはC++、そしてPythonライクなGDScriptで、Unityみたいにマウスポチポチしてオブジェクトへ色んな設定を決められるので「Unityみたいのでゲーム作りたいけど運良くヒットしたときライセンス料がなぁ」と懸念している人に役立つ。
ちなみにWiiニンテンドーDS用向けにリリースされたSEGAゲームタイトルソニックカラーズSwitchPS4などのマルチプラットフォーム移植ソニックカラーズ アルティメットはGodotを用いて移植されているので商用でも耐えうることはSEGA証明している。あのSEGAソニックでだ。

Shotcut

オープンソース動画編集ソフトウェア
様々な部分で動画ライブラリFFmpeg依存しているためFFmepgのフロントエンドソフトとしての性格も持つ。
この手の無料動画編集ソフト国内だとAviUtlや近年ではBlackmagic Design DaVinci Resolveが人気だけれど、海外オープンソース界隈ではShotcutは比較知名度が高い。
カラーグレーディングに関して不足のない機能を有しているので高度なトランジションを用いるというよりも色を追い込むような使い方が合っているだろう。
ていうかFFmpegのフロントエンドなのでFFmpegができることは理論上なんでもできる(理論上なので追加でコマンドを叩く必要があったりするけどね)。

Tenacity

オープンソースレコーディングソフトウェア旧名称はAudacityと言われるとご存じの方も多いハズ。プライバシー問題Audacityからプロジェクト分岐されTenacityとして再出発することとなった。
Audacityは開発の主な拠点ロシアを中心に行われていたという経緯があり、現在ウクライナ-ロシア戦争へ至る前の影響から個人情報収集ロシア企業が行うと発表され、それに反発したユーザーらによってプロジェクト分岐しTenacityプロジェクトが立ち上がった。
Audacity自体VSTプラグイン動作するなど非常に高機能レコーディングソフトウェアであったがウクライナ-ロシア騒動に巻き込まれたと言った感じだ。
Audacityから分岐したTenacityもそのまま高機能レコーディングソフトウェアなのでこれからはTenacityを使ったほうが色々面倒が少ないだろう。

Ardour

ProTools代替として挙げられがちなオープンソースDAW。非常に高機能DAWとして求められることの大半ができるものの、これもまた通例通り最近流行りの人工知能を用いた云々かんぬんは標準状態だとできない。
Ardourプロジェクトの立ち上げをし主要開発者であるポールデービス氏はJACK Audio Connection Kitのプロジェクトの立ち上げをし主要開発者であるという事実を伝えると驚く人がいるかも知れない。LinuxGitリーナス・トーバルズ的な文脈だ。

LMMS

オープンソース界のFL Studioと呼ばれることもあるDAWステップシーケンサーを中心に作曲するタイプDAW電子音楽が得意。LMMSという名称Linux Multi Media Studioの略でLinuxに端を発してマルチプラットフォーム展開をしたDAW
オープンソースDAWにしては珍しく初期状態から多数のソフトウェアシンセサイザープラグインが用意されておりインストールした時点で遊び始めることができるものの、オープンソースの例に漏れずクソUIを持っており使いにくい。GIMPBlenderもそうだが1990年代後半〜2000年代前半あたりに流行したMDI(Multiple Document Interface)を未だに引きずっているためクソUIになりがちなのだ
ググる日本国内にも意外とユーザーは居て、DTMやりたいけど初期投資は低く抑えたいみたいなユーザーが選んでいる模様。そういう需要ならLMMSの他に基本無料で全機能が使えて一部のプリセットが有料のVitalっていうソフトウェアシンセサイザーも導入しておくと延々遊べるよ。

Mozilla Firefox

オープンソースWebブラウザとして非常に有名な存在
Google率いるChromiumWebブラウザに近年物凄く押されているもの独禁法回避するためGoogleMozilla出資しているという歪な構造を持つ。
Mozilla運営が下手すぎて資金をドブに捨てることを繰り返しているためGekkoレンダリングエンジン未来があるのかと一部の識者から不安がられている。
Firefoxは使いやすいのか?と言われたら、それはもう好みの問題しか返せないのだがカスタマイズ性は非常に高い。


というわけで書いていて飽きたからこの辺でやめておく。気が向いたら何か追記するかもしれない。

2022-07-27

今、MATLAB立ち位置はどういうところか

雑誌Interfaceライセンス6ヶ月無料となっていて、一部界隈で話題になっているMATLAB


普段MATLABを使っている身だが、Pythonライブラリが充実している状況で、MATLABを使う意味は何か悩むことがある。

それなりに高いライセンス料を払って効果出てるのかって話になる。

本体だけでなくToolboxも使い出すと高くなる。

MATLAB言語仕様として速度が遅い(for文はJITで昔より高速になったというが遅い)だけでなく、高いワークステーションを買ったとしても普通にプログラムするとシングルプロセスで遅い。

GPUマルチコアの性能を活かすには、それ用のコードに書き換えと、メモリーコピーの影響などもあるので実際速くなるかプロファイル試行錯誤必要になる。


これ以外にGUIが古臭いなのに遅い、使いにくいなどがある。

plot周り、画像周りは気になる。


学生教科書+αとしてMATLABを使うのは、まだわかる。

とはいえ学生からすると会社に入ってからは使わない物を学ぶより、Pythonを学びたいはずだ。


企業が使う場合に関しては、先に挙げた理由でまず業務効率になかなか結びつかない。

レイヤー過ぎて開発コストがかかる、コストがかかる割に遅いなら別の手段で開発するはずだ。

からMATLABコードを動かしている所以外、新規MATLABを学ぶメリットはあるのか。


もう1つ気になる点は数値計算画像処理など、色々対応してはいるが、

業務で使おうとなった場合、足りてない部分が多くある。

画像だったらHDRの表示対応などだ。今どきのディスプレイ表示に対応してない。(HDR機能はあるが古い)

CAE的な物も教科書的な物は出来るが、業務的な物は扱いにくい。

toolboxが沢山あり、かつドキュメントもそれなりの量があるので、業務でも使えそうに思ってしまうが、

実際業務を進めると詰むことになり、結局別の有名ソフトで立ち上げ直すとなりがち。


(Juliaが代わりになると一時期話題になっていたが、実際本格的に使うと色々足りてない。)

2021-11-17

GoMockテスト辛い問題とかDDDって何それうまいの?とか

GoMockってのはGo言語ライブラリで、依存するinterfaceテストモックに置き換えてくれる。

それで、テスト中のモックの期待される振る舞い等を簡単定義できるのだ。

期待される振る舞いってのは、モックメソッド呼び出しやその引数とかだな。

期待される呼び出しが無かったり、引数が違ったりするとテストが失敗してくれる。

他に、メソッド戻り値副作用記述できる。

非同期処理のテストだとよく、wg.Done()をモックにさせたりする。

正直、これまで書けなかったテストがモリモリ書けて楽しい

けれどそのうち辛くなってくる。

まり、たくさんのinterface依存するサービスオブジェクトメソッドテストしようとすると、たくさんのモックのたくさんのメソッド呼び出しの全部の期待される振る舞いを書かないといけない。

モックメソッド戻り値によってサービスオブジェクトメソッド内の挙動が変わる。

すると連鎖的に、メソッド内で続いて呼ばれるモックに期待される挙動も、変わる。

依存interfaceが増えるとこの場合けが指数関数的に増える。

当然だ。

Go言語にはテーブルリブテストっていう、テストケースは配列簡単にまとめられると良い、という慣習・哲学がある。

しかし俺のサービスオブジェクトテストケースが肥大化複雑化しすぎてしまったようだ。

モックの期待される挙動を細かくケースに分類して配列にするのは恐ろしく辛い作業だ。

やりたくない。

どうしてこうなった

どうしてこうなったかは明らかだ。

サービスオブジェクトが巨大すぎるのだ。

ノシリックで巨大で複雑なものは凡人には扱えないからやめとけ、と偉い人は言う。

そうだなモノシリックは辛い。DDDかにすればいいんだろ?

やったよ(見様見真似で)。

モックでこれまでできなかったテストが書けるのはいいね

でもじつはここはまだ山麓だったのです。

サービスオブジェクトが巨大なモノリス化してしまったのです。

分け入っても分け入っても青い山。

おれはどこに行けばいいのだ。

参考文献

https://little-hands.hatenablog.com/entry/2020/12/22/ddd-in-first-3month

あとどこかにDDD100本ノックとかないかな。

2021-07-20

anond:20210720202348

もと増田だけど、気分まぐれに書いた駄文なので気にしないといてくれ。

それはさておき、Python が好きってことはプログラミングが好きってことで良いね?だとすると、最終的には C 言語やることになるけど、今は Python をやろう。なんと言っても、Python は C 言語できているけど、C言語謎いので無視してオッケー!

そんでもって、Python の「公式ドキュメント」をきちんと読みこなせるようになろう。最初から全部は必要ないけど、最終的には読みこなせるようになろう。そんでもって、プログラミングをしたいってことは「何かを作りたい」のだろ?たとえば、増田を作りたかったら Python だと Django や Flask を、人工知能を作りたかったら PyTorch を使うことになるだろうけど、その手のフレームワークの「公式ドキュメント」を読みこなせるようになろう。プログラミングスクール(やめとけよ)や本は「公式ドキュメント」を読めるようにする手段だと思ってくれ。間違っても「本に書いてあったのに、動かない!」なんて、喚かないでね。洋書和書も「公式ドキュメント」以外のテキストは間違っていることがあるので。

次に「エラー友達」ということ。エラーあなた否定したのでなく、コード否定したのであって、エラーが出ても気にしないでください。そんでもって、エラー文を丁寧に解決していけば、すごくスキルが身につきます

最後に、Python 言語だけじゃ解決できないプログラミング問題は多々ありますデータベース操作するには SQL が、ウェブサイトを動かすには JavaScript が、ウェブサイトを作るには HTML/CSS が、サーバーを設置するにはシェル言語が、Python高速化するには C言語が、必要になる場合がありますPython を使いこなせると、おそらく習得は容易でしょう。なぜかというと「Python だとチョメチョメだったっよなー、これでいけないか?」という勘が形成されるので。

チューリング完全言語はどれも表現力は同じだから、「この言語から成功する」というのは無いよ。Pythoninterface が無くて、class が弱くて、動的型付けを用いているけど、これらがないと「制約」を課すことができないというフリーダム過ぎるから、嫌らわれることはあるけどね。制約が強い言語は、ハンターハンターふうに言うと「制約が念能力を強くする」みたいな要素はあるよ。

どうしても教育を受けたいという希望があるのなら、ハーバードの CS50 という講義無料で見れるから、推薦したいね。あれみると、我が国計算機科学は負けていると思った。

2021-05-27

anond:20210527102211

xcodeInterface Builderの.nibだっけ?

RADで生成されるものは大きくてもuntouchableだし、

DelphiとかC++ Builderなんかで書く量はかなり少なかった記憶がある

2021-05-19

anond:20210519074312

トラ技とかInterfaceとか、あとジャンル外だとSound and Recording Magazineとか、ああいうのは地方部品屋とか中古ショップ情報載ってていい「場」なんだよね

2020-10-23

[]2020年10月22日木曜日増田

時間記事文字数文字数平均文字数中央値
009617567183.040
01272198636730.3929
0219370058363.0128
03320150343469.8630
0414889572605.2714
05216127183588.8725
068346510560.4709
075119774387.7368
087513686182.543
0911837241315.6160.5
101371310095.638
1111913112110.249
1214417102118.859
1313118129138.453
1418322752124.348
151921760691.737
1613713694100.047
1710711608108.550
181191160297.543
199710114104.346
201671661999.536
2117618675106.142.5
2211813916117.944.5
23102868285.142
1日3501977281279.194

本日の急増単語 ()内の数字単語が含まれ記事

ロア(11), みゆ(13), ジャーキー(3), Trait(3), 上げ底(12), 富士山頂(3), 詰まん(3), ナイチンゲール(6), interface(3), ポプラ(5), 消費財(5), レンタル(50), 方言(15), スタバ(12), セブン(10), 失望(10), 鬼滅の刃(15), ラップ(10), 若く(24), 若い女(14), 洗わ(7), きれいな(10), Vtuber(16), 定義(52), 中年(15), 消費(53), 滅(11), 美人(31), 無職(23), 性的(53), 鬼(15), 容姿(23), 無意味(16), メンヘラ(14), LGBT(12)

頻出トラックバック先 ()内の数字は被トラックバック件数

無職中年男が若くてきれいな女性失望した話 /20201021210748(67), ■LGBTに物申す。 /20201022112648(16), ■継承禁止するべき /20201022005749(15), ■観光がなんなのかわかんなくなってきた /20201020160713(14), ■東証障害富士通はケシカラン! /20201021201859(11), ■嫁とのやりとりがものすごく煩わしい /20201022091003(11), ■セブンイレブンは一度潰れたほうが良いよ /20201021232805(10), ■ちんぽがイキそうな時にどんな歌を歌うべきか /20201021193539(9), ■ /20201022120751(8), ■ /20201022010831(8), ■京○ニ、ルッキズム金閣寺 /20201022130009(8), ■増田に下の名前がないのでつけることにした /20201022160132(7), ■この国で生きることが地獄でない理由を言える人なんているの? /20201022163026(7), ■マスク効果があるとの研究結果ではノーマスク勢は変わらない /20201022183903(7), ■ /20201022144746(7), ■マスク無しで喋る人に傷害罪適応してほしい /20201022150414(7), ■テレワークどうでしょう /20201020221445(6), ■死にたいと思ったらエアロバイク漕ぐといいんだよ /20201022101050(6), ■性的消費って結局なんなん? /20201022125845(6), ■毒親 /20201022211923(6), ■ /20201022140923(6), ■にじさんじファンあきらめて覚悟しろ /20201022210505(6)

2020-10-22

anond:20201022213743

さぁ?オレはScala嫌いだから知らんよ。

まぁ、でも多分こんな目的では?という予想はあるよ。

・もともとは C++ は多重継承ができて、カオスになった。

Java単一継承となり、振る舞いの規約として Interface が生まれ、具象化が不要な始祖クラスとして抽象クラス発明された。おかげで、言語官僚化した。

RubyScala では、Interface に振る舞いが記載できるようになって、Mix-In という方法で振る舞いを継承できるようにした。その継承に優劣をつけれるようにすることで、C++Java の出来なかったことを解消しようとした。

・今のところ、単一継承を行うクラスベース継承を行う言語でこれ以上の解答を用意できた言語はない。今のはやりは Rust のような後付の継承を良しとするプロトタイプベース継承時代のはやりである

こんな感じなんじゃねーの?Ruby が好きだからRuby 史観で書いたけど。つまりトレイトって「振る舞い」が記載できる Interface のことだと思うよ。

anond:20201022115144

そんなんわかってるよ。だからinterface概念ないっていってるじゃん。

イディオムとしてABC使ったとしても継承しか振る舞いの定義方法のやり方がないから何も間違ったこと言ってないと思うんだけど。

anond:20201022005749

pythonにはinterface概念がないので継承を使わざるをえない場面があるので極力関数定義にしてるわ。

ステートフルなデータを扱う場合状態を表すデータ型用意して関数でこねくり回すようにしてる。

mix-inの場面考えてもpythonでそれなりの規模を開発するとなったら関数合成のほうがテストメンテも楽だし。

anond:20201022005749

AにBを持たせる

class A {
    private B b;
    // 実装
}

AをラップしてBと共通インタフェース実装する

interface IB {
    // Bのメソッド
}

class AWrapper implements IB {
    private A a;
    // 実装
}

class B implements IB {
    // 実装
}

2020-10-13

null もあるし Maybe, Option, Result みたいな型もジェネリクスもない Go が何であそこまで流行ってるのかわからん

goroutine やら interface がお手軽だし、悪い言語とは全く思わないし Go でいくつかサービス作って割と楽しかったけどけどここまで市民権を得ている理由がよくわからない。

シングルバイナリなんて今の時代どの言語でも吐き出せるし、ロブパイクとケントンプソンが作った信頼の処理系からか?

ログイン ユーザー登録
ようこそ ゲスト さん