News for hackers. Stuff that matters.

new4thaccount

Sounds really cool! As someone who programs a bit for work to help with automating processes and fun, but is not a computer scientist I'm a little jealous of never having taken a true database, compilers, PLT, or theory of computation course.

It sounds like you and your classmates are top notch and will go on to some pretty freaking cool careers (ex: I'd work at Jane Street if I was not a parent and a lot smarter :)). Out of curiosity, what are the typical places your classmates go upon graduation?

Re:OCaml 4.08 on Sunday June 16, 2019 @11:16AM (#20195867)
I have a few Clojure books, but not knowing Java and the JVM very well and then having to learn Emacs/Cider and all the other tools really kind of killed it for me. In short, some of the Clojure REPL advantages are better than Python, but not by enough to justify learning the ecosystem.

I might try again later. I have "Clojure for the Brave and True", Carin Meiyer's book, and one of Fogus' books.

I really want to learn Clojure, but just need to sit down and put the time in. It's also discouraging to see people comment about some of these languages (Clojure and F#) as being on life support.

Give Julia a try if you haven't. If you're coming from Python and also have some Octave experience, it will be easy and worth a look.

For scientific coding I usually use either Python or Julia and Fortran or Octave at home sometimes.

Yep, the takeaway for me was that the Python project required far less code, but we're not sure how fast it ran. Further below, the author states the inputs were so small it didn't matter. What if it did? Would the Python solution still be viable?
Re:OCaml 4.08 on Saturday June 15, 2019 @09:08AM (#20189859)
Python was already in the top 5 well before the whole AI craze and before pandas was out.

Python has a huge amount of introductory learning material that assumes it is your first language, while most FP languages (Ex: Clojure, Haskell, F#, Scala, OCaml) really struggle in this area. I really like FP, but there is a bit of a steep plateau when learning. If you look at some of the questions people ask in the Python stack exchange, you get the impression that millions are learning it as the defacto first language (I was one of those nearly a decade ago). I try to find similar paths to FP and everything from the tooling to lack of thorough introductory material keeps killing it for me.

Another issue is that from a pedagogy perspective all the "building blocks" in FP are different to what many people already know. If you're used to the imperative/OO paradigm you can move between languages by just learning the syntax to (lists, dictionaries, while and for loops, branching, array access, file IO, and classes). When learning FP you have to learn similar, but different concepts (pattern matching, monads, currying, discriminated unions...etc).

The beginner books that do exist (ex: learn you a Haskell) are nice, but I've talked to many (myself included) that when they finish say "I still have no clue how to program in Haskell". To give another example, I spent two weeks reading a Python book on building text games and when I was finished I was like "OMG I can do stuff". That book covered how all the main data structures could be used with short and fun programs. It also included reading text files, string operations, pickling data, classes, modules..use of the included IDLE IDE. It was great.

Re:OCaml 4.08 on Saturday June 15, 2019 @09:06AM (#20189848)
IIRC, they go over some of the background of it on their website.
Re:When Employees Use Software That IT Hasn’t Approved on Wednesday June 12, 2019 @07:28PM (#20170401)
Wow. The same at my company. It doesn't matter that it has been successfully justified 10 times. The same email comes out quarterly.
Re:Scala 2.13 is now available on Wednesday June 12, 2019 @08:11AM (#20163704)
Does it still require you to magically know a ton of Java classes?
Re:A Field Guide to Power Transmission Lines on Tuesday June 11, 2019 @10:20PM (#20161207)
The complex imaginary channel on YouTube for the power PE test covers when to use sqrt(3) and starts off very basic.
Re:A Field Guide to Power Transmission Lines on Tuesday June 11, 2019 @10:16PM (#20161188)
This is nice that they make it public, but it has limited value if it doesn't have more information such as:

Real-time generator MVA values Real-time load MVA values Real-time line flows Generator fuel types *Equipment impedances

You need the above for real-time views or for running studies.

Re:A Field Guide to Power Transmission Lines on Tuesday June 11, 2019 @10:11PM (#20161166)
I was always taught that one of the main reason to use multiple conductors was due to reduce the losses caused by the corona effect of ionizing the air.

As another commenter says, bending might also be a factor.

Re:Scala 2.13 is now available on Tuesday June 11, 2019 @07:06AM (#20154369)
Most of my background is in Python, but I've dabbled in a lot of languages out there from Haskell, lisp, Perl...etc. The point being I don't mind trying new things. I don't know Java and the JVM very well though and a lot of hosted languages like Scala, Clojure, Kotlin...etc seem to assume that you're intimately familiar with it which is a pain. Also, the Scala tooling when I last checked ~2 years ago was complex. I just wanted to write a simple app and started drowning in the complexity of SBT and gave up pretty quick. Your mileage may vary, especially if you're already familiar with the Java ecosystem. I've had more success with F# and OCaml.

Note that I'm not saying Scala is bad, it just wasn't an easy enough transition for me to justify climbing the plateau. Clojure ended up being a similar situation. These languages are also optimized around writing large software projects and that was a hindrance rather than a benefit to someone that does more scripting than anything.

Re:Solving Sudoku with Prolog (2016) on Monday June 10, 2019 @10:32PM (#20152640)
Thanks for working through my example question.

I may have to give Prolog another shot at some point!

Re:Solving Sudoku with Prolog (2016) on Monday June 10, 2019 @10:29PM (#20152627)
59M sounds pretty sweet!

I'll check out Triska's videos when I pick up my Prolog book on writing a text adventure again. It's pretty much the only Prolog book that helps walk me through it without the theory. I do like theory, but I need a high level overview first before I can make sense of anything.

The basics of the system are very easy to describe, but realistic system implementations are waaay more complex and have hundreds of pages of solver code and SQL packages. A very simple example on a tiny system would be the below:

https://www.juliaopt.org/notebooks/Dvorkin%20-%20Power%20sys...

Re:Salesforce is buying Tableau for $15.7B on Monday June 10, 2019 @10:02PM (#20152535)
Yea I've been a little confused here until I realized I would just write some bash, Python, Perl...etc script where some would advocate for complicated tools.
Re:Solving Sudoku with Prolog (2016) on Monday June 10, 2019 @09:07PM (#20152319)
How is Prolog ideal for when you'd use SQL? I can understand it if you're talking about querying a CSV file, but the advantage to SQL is that the database with all your data natively supports SQL and it can usually run pretty fast.

Btw: what would it look like to query a small sample CSV file. Like the below example if you wanted to find all cars that are made by Ford?

Brand,Model,Year,Color/n Ford,F150,1999,Black/n Toyota,Yaris,2013,Yellow/n Ford,Mustang,1969,Blue/n

Edit: sorry for not knowing how to format HN properly and show the newline on each of the rows.

Re:Solving Sudoku with Prolog (2016) on Monday June 10, 2019 @08:20PM (#20152115)
Thanks for your hard work. I really want to like Prolog, but I often don't know how to fit it into an actual system of use.

My field is power systems which involves solving numerical problems with large sparse matrices and very large scale optimization problems (millions of constraints) using LP and MIP solvers.

The first class of problems can be easily solved with tools like Matlab, Fortran, Python, Julia, C++...etc. The optimization problems can be solved with any language that has a library to talk to a solver.

Prolog is really cool, but I doubt it could solve problems of that size even if given days, much less a few minutes. I'd love to be proven wrong, but it seems like it really excels at these small toy problems. Could you enlighten my ignorance on how it can be used on larger scale problems? Thanks in advance!

Re:Is There Room for a New Desktop Operating System on Monday June 10, 2019 @06:10PM (#20151380)
That is cool. Thanks!
Re:Matlab–Python–Julia Cheatsheet on Sunday June 09, 2019 @06:48PM (#20142403)
Julia JITs to native LLVM code and is really fast for a lot of use cases. For things where the JIT warming up takes less time than the full job, it can be better than Python. It was also developed with numerical computation in mind, so it was designed for that performance wise and has so many brilliant people working on the language and library. You can use macros for awesome DSLs and run on the GPU and in parallel a lot easier than Python in some cases. It has a first class package manager, great REPL and doesn't need an installer.
Re:Pictures show cracks in Ayrshire nuclear reactor on Sunday June 09, 2019 @12:05PM (#20140023)
There is some series on nuclear disasters going on all the time. PBS just did a big one on Fukishima last year and Command and Control has been put out again recently. Maybe it's a slight surge, but people have always been interested in these subjects. If you haven't seen either I would highly recommend. Command and Control is particularly frightening as many don't know about it.
Re:Pictures show cracks in Ayrshire nuclear reactor on Sunday June 09, 2019 @11:59AM (#20139991)
I don't think democracy is the problem. The current and broken system in many nations is. I'd rather not have a dictatorship and I don't see Anarchy being particularly effective either. What is your solution?

Edit: I understand the feeling of helplessness, but saying that democracy doesn't work is dangerous as this feeling of apathy spreads and people stop participating in the system and we lose many of the more reasonable voters and then less savory candidates get elected and make things even worse and more apathy spreads and so forth. It becomes a vicious cycle and self-fulfilling prophecy. I'm very guilty myself, but have vowed to start participating more in elections and local politics.

Re:Researchers discover meat-eating plant in Ontario on Sunday June 09, 2019 @11:48AM (#20139928)
This doesn't seem that new to me, besides the location being in Canada. I watched a PBS special on Carnivorous plants recently and they covered the fact that pitcher plants in some parts of the world will digest the rodents that fall into them. The rodents like to lick the sweet nectar and poop in the plants which benefits both species. However, they do sometimes fall in and then die and are slowly digested. Researchers filmed this and then found rodent skeletons in some of the plants.

Funny enough, someone found this back in Victorian days and all the papers talked about the meat eating plant. The Venus fly trap seriously put a dent in their view of plants. This was all talked about in the same PBS special.

As someone who is kinda a minimalist when it comes to code (prefers simplicity and less libraries and excessive moving parts) I've often wondered about this.

The problem is that unless we're just talking about simple charts that act as a debugging/REPL tool, you'll have to redo them for writing reports which is then twice the work.

Yea...it doesn't need to be perfect or have pretty much any apps except for web browser, mp3 player, PDF viewer, document viewer, text messaging, alarm ...that is the only thing I use my phone for.
Re:Nim 0.20.0 (1.0 RC1) released on Thursday June 06, 2019 @07:38PM (#20120275)
Any way you could go into more detail on your work and how your apps are setup. I'm guessing your Nim code transpiles the dashboard code to JS and the backend to C?
Re:Nim 0.20.0 (1.0 RC1) released on Thursday June 06, 2019 @07:10PM (#20120128)
I've used Nim a bit and even read most of Dom's book (Nim in Action) and it felt pretty natural to me as someone who does most of their coding in Python. Sure it has some Modula inspired keywords, but it still feels Pythonic in a way I can't easily describe.

Rust on the other hand hurts my brain like Haskell as it is so foreign.

The South is pretty friendly and outgoing in many places. I strike up conversations almost everywhere and most people are ok with it. Of course there are some people that hate small talk and I try to respect that.
Re:Is There Room for a New Desktop Operating System on Wednesday June 05, 2019 @06:11PM (#20109670)
First of all, thank you for your work. Since I don't contribute myself, I'm a bit of a parasite :)

Second, I'm salivating at the prospect of booting into a Red terminal directly on hardware. Would I be able to use the View DSL for graphics, or just the text parts of the console?

Best of luck! Also, I'd love to hear more details.

Re:Is There Room for a New Desktop Operating System on Tuesday June 04, 2019 @06:44PM (#20099970)
An interesting question, but you already know the answer to it :).

Linux has a lot of users giving it time and money and even it struggles with driver and other support. There are other desktop projects out there that take Amiga and BeOS and have a decent OS overall, but nobody can use them as serious daily drivers for work (ok, most of us can't). I think there is a lot of room for improvement here, but it's a massive project and so far nothing can touch those big three with the exception of BSD, which is the obvious 4th place I think.

What I really want is a billion dollars to have a brand new Smalltalk or Lisp machine built with great hardware support, graphics, and something like Mathematica builtin to it. Rebol/Red would also be good here.

I ran the query before and it was a lot of fun.

Older »