This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-18
Channels
- # announcements (1)
- # aws (13)
- # beginners (55)
- # calva (8)
- # cider (73)
- # cljs-dev (96)
- # clojure (119)
- # clojure-europe (4)
- # clojure-italy (41)
- # clojure-nl (14)
- # clojure-uk (6)
- # clojurescript (90)
- # cursive (14)
- # data-science (1)
- # datomic (20)
- # dirac (1)
- # emacs (32)
- # figwheel-main (11)
- # fulcro (81)
- # hoplon (2)
- # jobs (1)
- # lein-figwheel (2)
- # luminus (1)
- # lumo (19)
- # nyc (3)
- # off-topic (60)
- # other-languages (1)
- # pedestal (5)
- # quil (1)
- # re-frame (3)
- # reagent (3)
- # reitit (5)
- # remote-jobs (1)
- # ring-swagger (2)
- # shadow-cljs (43)
- # sql (15)
- # tools-deps (20)
- # vim (21)
- # yada (6)
ctrl-d is eof, might work
@alexmiller Not really just for read-line
. I need to interrupt the loop.
hmm, what is “throwing it in the pool”? 😅
sometimes, that's the only thing that works
@elecbuggy did you see this? https://lispcast.com/clojure-windows-8/
@codestar8 He's trying to follow https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows which is the new PowerShell module installer.
Those instructions from Eric are about getting Java and Leiningen installed, not the new Clojure CLI tools.
Ahhh ok. Not sure what PowerShell is?
Microsoft's "next gen" command line shell https://docs.microsoft.com/en-us/powershell/ -- it was open sourced three years ago but I haven't seen it running anywhere except Windows...
@alexmiller Yeah very funny. I’d appreciate the joke better if someone could help me with my question.
I don’t think there’s any support for interrupting something that you started with repeatedly, barring throwing an exception inside it, which read-line probably doesn’t?
That’s just an example. I can pass something into the loop or throw an exception if needed. My real use case is to keep reading from a telnet connection, and I need the ability to stop it. If I can’t stop it, then I will have to start a new repl after everytime I run the app.
I think nrepl allows interruption?
So it’s due to the lein repl’s limitation? How normally would you handle ctrl-c in clojure or java programs?
Why is it that core.matrix
has this name when specifying it as a dep [net.mikera/core.matrix "0.62.0"]
but when you require
it, you must call it clojure.core.matrix
?
@tabidots it is what's being defined in the source. See https://github.com/mikera/core.matrix/blob/develop/src/main/clojure/clojure/core/matrix.cljc
net.mikera/core.matrix
is the dependency's name on clojars, so that's what you need to reference it by
Oh, alright. So those two things are completely independent, and a library creator can make the require
name whatever they want by manipulating the folder structure etc.?
AFAIK, yes, people can chose whatever NS they want and it might have collisions with other libraries if you're not careful. Usually people use a reversed TLD that they own as the ns
Gotcha. Yeah I’ve been noticing the reversed TLD thing. That practice comes from Java, right?
not sure, I have about 0 Java knowledge, only time I touch Java is when I need to figure out something in Clojure... (and debugging Jenkins failures)
That’s just an example. I can pass something into the loop or throw an exception if needed. My real use case is to keep reading from a telnet connection, and I need the ability to stop it. If I can’t stop it, then I will have to start a new repl after everytime I run the app.
So it’s due to the lein repl’s limitation? How normally would you handle ctrl-c in clojure or java programs?
There is some Java support for signal handling
That’s setting it up for the main Clojure repl as an example
Uses a very old weird api hence the com.sun api. Last I checked there was no official replacement yet
Trying to migrate this sql file (001-site.up.sql) with ragtime
:
-- Create site and site_translation tables
CREATE TABLE site (id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
base_url VARCHAR(511) NOT NULL);
--;;
CREATE TABLE site_translation (site_id INT(11) NOT NULL,
language VARCHAR(5),
display_name VARCHAR(255) NOT NULL,
FOREIGN KEY (site_id) REFERENCES site(id))
DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
--;;
INSERT INTO site (name, base_url)
VALUES ('miyuru_gee', ' ');
SET @ins_id1 = LAST_INSERT_ID();
INSERT INTO site_translation (site_id, language, display_name)
VALUES (@ins_id1, 'en-US', 'Miyuru Gee');
INSERT INTO site_translation (site_id, language, display_name)
VALUES (@ins_id1, 'si', 'මියුරු ගී');
--;;
INSERT INTO site (name, base_url)
VALUES ('ananmanan', ' ');
SET @ins_id2 = LAST_INSERT_ID();
INSERT INTO site_translation (site_id, language, display_name)
VALUES (@ins_id2, 'en-US', 'Ananmanan');
INSERT INTO site_translation (site_id, language, display_name)
VALUES (@ins_id2, 'si', 'අනංමනං');
And I keep getting errors. The latest is:
Applying 001-site
Execution error (SQLSyntaxErrorException) at com.mysql.cj.jdbc.exceptions.SQLError/createSQLException (SQLError.java:120).
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SET @ins_id1 = LAST_INSERT_ID();
INSERT INTO site_translation (site_id, languag' at line 4
I have spent too much time on getting this migration task going. How am I supposed to do this?Should I just skip using these clojure libraries and just resort to using a mixture of sql + bash scripts?
@ghadi Yeah, forgot to mention, this script runs fine when invoked in mysql with source 001-site.up.sql
.
Hi all. I'm beginning to learn clojure and need some ideas for a good first clojure project. Thanks in advance 😀
Hi Gurpreet, Depends on you I guess. I found that doing project Euler problems with Clojure great fun. It was a total different way of thinking about programming puzzles generally.
Have you done other programming languages? I like using Clojure to reproduce projects I've done in other languages.
Advent of Code and Project Euler are where it’s at. I am going back and forth between those and developing a number theory library (at least for myself, if it’s not good enough for production 😅)
While you're learning it's nice to see other people's code for comparison. I like code wars.
Thank you all for your suggestions 🙏
this talk sets spec against type systems very well
haha, okay
just reading about structural type systems, so decided to ask more experienced colleagues
my understanding is that it isn't a type system at all, that said I know nothing about structural type systems