This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# Copyright (c) 2016 Chandler Abraham | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
haskell-lsp:Starting up server ... | |
2018-05-09 12:06:07.689664 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":36474,"rootPath":"/Users/leonti.bielski/myob/property-testing-demo/payslip-property-testing-haskell/","rootUri":"file:///Users/leonti.bielski/myob/property-testing-demo/payslip-property-testing-haskell/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false}},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"commitCharactersSupport":false},"contextSupport":true},"hover":{"dynamicRegistration":false},"signatureHelp":{"dynamicRegistration":false},"references":{"dynamicRegistration":false},"d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused)] | |
use std::io::Write; | |
use std::io; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
use std::time; | |
use std::sync::{Arc,RwLock}; | |
// https://github.com/Nervengift/chat-server-example/blob/master/src/main.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused)] | |
#[macro_use] | |
extern crate crossbeam_channel; | |
use crossbeam_channel as channel; | |
use std::io::Write; | |
use std::io; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused)] | |
#[macro_use] | |
extern crate crossbeam_channel; | |
use crossbeam_channel as channel; | |
use std::io::Write; | |
use std::io; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
use std::time; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! A chat server that broadcasts a message to all connections. | |
//! | |
//! This example is explicitly more verbose than it has to be. This is to | |
//! illustrate more concepts. | |
//! | |
//! A chat server for telnet clients. After a telnet client connects, the first | |
//! line should contain the client's name. After that, all lines sent by a | |
//! client are broadcasted to all other connected clients. | |
//! | |
//! Because the client is telnet, lines are delimited by "\r\n". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! A chat server that broadcasts a message to all connections. | |
//! | |
//! This example is explicitly more verbose than it has to be. This is to | |
//! illustrate more concepts. | |
//! | |
//! A chat server for telnet clients. After a telnet client connects, the first | |
//! line should contain the client's name. After that, all lines sent by a | |
//! client are broadcasted to all other connected clients. | |
//! | |
//! Because the client is telnet, lines are delimited by "\r\n". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package backup | |
import java.io.OutputStream | |
import cats.effect._ | |
import cats.effect.implicits._ | |
import cats.implicits._ | |
import fs2.{Chunk, Pipe, Stream, io} | |
import java.util.zip.{ZipEntry, ZipOutputStream} | |
import fs2.concurrent.Queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Printing extends App { | |
trait Test { | |
val name: String | |
} | |
case class TestSingle(name: String, t: String, isOptional: Boolean) extends Test | |
case class NestedTest(name: String, fields: List[Test], isOptional: Boolean) extends Test | |
val testData = NestedTest("main", List( |