Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

.NET is now cross-platform.

Name: Anonymous 2014-11-12 21:08

http://news.microsoft.com/2014/11/12/microsoft-takes-net-open-source-and-cross-platform-adds-new-development-capabilities-with-visual-studio-2015-net-2015-and-visual-studio-online/

They throw around terms like open-source, but that doesn't usually mean what you want it to when MS says it, so who knows. There's also a free version of VS for small teams which is apparently feature-complete or nearly so.

Name: Anonymous 2014-11-12 21:10

>>1
VS
Who even uses this shit?
.NET
The only thing of note there is Nemerle.

Name: Anonymous 2014-11-12 21:11

I have never even heard of this. Why should we care again?

Name: Anonymous 2014-11-12 21:21

there is no visual scheme 2015, so i don't care.

Name: Anonymous 2014-11-12 22:17

What the fuck is .net?

Name: Anonymous 2014-11-12 23:24

>>5
The domain that you requested, whatthefuckis.net, is still available! If you would like to use this domain name, we recommend that you reserve it as soon as possible.

Name: Anonymous 2014-11-12 23:50

https://github.com/dotnet/corefx
What the fuck?

This project is licensed under the MIT license.
What the fuck?

Name: Anonymous 2014-11-13 1:42

>>2
F# is pretty good. And there are fun things like Ioke.

Name: Anonymous 2014-11-13 14:25

Is the CLI better than LLVM?

Name: Anonymous 2014-11-13 15:51

I will roll my own windows distro with systemd installed by default!

Name: Anonymous 2014-11-13 16:22

>>8
Is it as good as Haskell?

Name: Anonymous 2014-11-13 17:01

>>8
F# is the poor man's SML.

Name: Anonymous 2014-11-13 18:41

>>12
You don't know either of them so stfu.

Name: Anonymous 2014-11-13 19:09

>>13
No, you.

Name: Anonymous 2014-11-13 22:07

Looks like the 4chan niggers have discovered us.

Name: Anonymous 2014-11-14 1:29

>>15
They were never unaware.

Name: Anonymous 2014-11-14 1:56

>>1
I use C# at work, so I'm kind of glad of this. There aren't great high-level options on Linux right now, so this will take the place of Java (for me) if I should ever have need of that sort of language in my personal projects. I just hope they manage to keep the performance they have on Windows, where C# is only slightly worse than native code (actually, "raw" C# is equivalent to native code in speed, but the various frameworks they tack on make it much slower for a large range of programs in practice).

Name: Anonymous 2014-11-14 3:55

>>17
Since they've open sourced it under such a permissive license, we might very well see outside contributors cleaning up bugs and making performance improvements that MS previously didn't have the balls to attempt.

Name: Anonymous 2014-11-14 4:08

Windows Server is kill ¯\_(ツ)_/¯

Name: Anonymous 2014-11-14 7:21

>>15
And that's since the moment you first visited this site.

Name: Anonymous 2014-11-14 7:46

>>17
I use software running in mono all the time and it works very well. C# is already a better option than Java on Linux.

Name: Anonymous 2014-11-14 9:53

check'em

Name: Anonymous 2014-11-15 14:04

How is VS better than Vim?
How is C# better than Haskell?
Useless.

Name: Anonymous 2014-11-15 14:22

>>23
I will answer as if you were serious.
1. It's not, except that much C# depends on autogen'd boilerplate.
2. Haskell is infamously impenetrable. C# is easy to use while remaining powerful.

Name: Anonymous 2014-11-15 15:09

>>24
COP
easy to use
AbstractFactoryAdaptorVisitorComponentInterfaceBuilder.cs

Name: Anonymous 2014-11-15 18:11

>>25
Who are you quoting, retard?

Name: Anonymous 2014-11-15 21:38

>>25
That sort of thing is stylistic. A big reason Java is so much worse than C# despite being similar syntactically is that stuff like that has been baked into the libraries. The C# libraries themselves aren't "architect driven" and don't have that problem.

Name: Anonymous 2014-11-15 23:17

>>27
So you have a problem and you think, "I know, I'll use Java!"

Now you have a ProblemFactory.

Name: Anonymous 2014-11-15 23:42

>>28
MultiLelFactoryPatternImplementer.Implement().Run();

Name: Anonymous 2014-11-16 0:35

consitted an aaaaaaaarmful

Name: Anonymous 2014-11-16 7:03

Non-lazy language? Easy to use? What a joke. Non-lazy languages have no capabilities for abstraction.

Name: Anonymous 2014-11-16 16:24

>>31
Creating abstractions is the domain of the compiler writer, not the average developer.

Name: Anonymous 2014-11-16 16:45

>>32
Or so the C# and Java enterprise slaves think.

Name: Anonymous 2014-11-16 18:48

>>31
Laziness is trivial. Laziness was not built into (common) lisp, yet you can implement it using 2 macros that are 4 lines each.

Name: Anonymous 2014-11-16 19:12

>>34
Can you make it setf transparent?

Name: Anonymous 2014-11-16 19:25

>>35
Like how? (setf (force x) 4)?

Name: Anonymous 2014-11-16 19:40

>>34
Educamate yourself on what laziness is.
In short, it is normal order of evalueation PLUS MANDATORY FUCKING SUBEXPRESSION SHARING. The pointer mess it creates is astounding. I have tried twice to implement it, with no success.
Try starting at http://en.wikipedia.org/wiki/Lazy_evaluation
See the example
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
With proper laziness, fibs is shared. With naïve ``laziness'' aka non-strict evaluation, it is usually not. Which converts these fibs from a checkable linear time and constant space to have-time-to-make-tea time and blow-your-fucking-stack-up space.
There is no fucking way to implement it with 2 macros. There may be some chance to implement it with 20 very clever macros though, but I'm too drunk to assess this possibility in greater detail.

Name: Anonymous 2014-11-16 22:06

>>37

Here's a memoized delay and force. It's not quite enough to get that syntax, but it might be close.

(defpackage #:lazy-memo
(:use #:cl)
(:export ))

(in-package #:lazy-memo)

;; TODO: This should have a maximum capacity
;; and remove not recently used values.

;; eval-cache stores a mapping expression -> value
;; where expressions are lists of the form
;; (function-name value1 value2 ...). sbcl seems to
;; barf if you try to evaluate (symbol-function function-name)
;; at compile time, so function symbols are stored
;; instead of their actual values.
(defclass eval-cache ()
((table :accessor get-table
:initarg :table
:initform (make-hash-table :test #'equal))))

(defmethod insert-expr ((self eval-cache) expression value)
(setf (gethash expression (get-table self)) value))

(defmethod forget-expr ((self eval-cache) expression)
(remhash expression (get-table self)))

(defmethod lookup-expr ((self eval-cache) expression)
(multiple-value-bind (value contained)
(gethash expression (get-table self))
(values value contained)))

(defmethod print-table ((self eval-cache))
(maphash (lambda (k v) (print (list k v)))
(get-table self)))

(defmethod eval-expr ((self eval-cache) expression)
(if (not (listp expression))
(progn (print (list expression "bypassed"))
expression)
(multiple-value-bind (value contained)
(lookup-expr self expression)
(if contained
(progn (print (list expression "cached"))
value)
(let ((value (apply (symbol-function (car expression))
(cdr expression))))
(insert-expr self expression value) ;; evaluated and cached
(print (list expression "computed"))
value)))))

(defvar default-cache (make-instance 'eval-cache))

(defmacro cached-call (expression)
(cond ((or (not (listp expression))
(null expression))
expression)
;; This breaks if expression is calling a macro.
;; (car expression) should be a function name.
(t `(eval-expr default-cache
(list ',(car expression)
,@(cdr expression))))))

(defmacro delay (expression)
`(lambda ()
(cached-call ,expression)))

(defun force (v)
(funcall v))

(defun test1 ()
(cached-call (+ 2 3 4))
(print-table default-cache))

(defun fibs1 (n)
(if (< n 2) n
(+ (cached-call (fibs1 (- n 1)))
(cached-call (fibs1 (- n 2))))))

Name: Anonymous 2014-11-17 0:36

The best part is I know I’ll be making apps that are fundamentally better to use than before.

Name: Anonymous 2014-11-18 7:05

(defun lazy-map (fn l1 l2)
(if (or (null l1) (null l2))
nil
(cons (funcall fn (car l1) (car l2)) ;; caching needs to happen here
(delay (lazy-map fn
(force (cdr l1))
(force (cdr l2)))))))

(defvar fibs2 nil)
(setf fibs2
(cons 1 (delay
(cons 1 (delay
(lazy-map #'+ fibs2 (force (cdr fibs2))))))))


It produces the fibs but I don't know if it's linear time. The caching looks really weird.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List